SFTP mod update "file does not exist"
failed to install mods: failed to install [email protected]: could not extract DirectToSplitter: failed to remove directory: \FactoryGame\Mods\DirectToSplitter: failed to delete path: file does not exist
Debug info not yet generated`
Is there any news on this yet? Slowly we would really like to start playing on our dedicated server, but this is not possible with mods because the ModManager has problems.
This is the issue that occurs with AMP servers returning not found when trying to delete a directory.
From the debugging on discord, the actual cause is that the SFTP standard requires a FILE_IS_A_DIRECTORY to be returned when trying to run rm (rather than rmdir) on a directory, but AMP's SFTP server (Rebex) returns NO_SUCH_FILE, and when combined with go's sftp.RemoveAll (and more specifically, Remove), which first tries to run rm, and only attempts a rmdir if the error received was FILE_IS_A_DIRECTORY, FAILURE, or EPERM (as a special case for osx non-standard SFTP), results in AMP's NO_SUCH_FILE to be sent up the call chain.
There are two potential fixes which patch go's SFTP client: adding NO_SUCH_FILE as another special case for Remove (like the osx one), or calling RemoveDirectory in RemoveAll if the current path is a directory (though this would still leave Remove on directories broken)