SatisfactoryModManager icon indicating copy to clipboard operation
SatisfactoryModManager copied to clipboard

SFTP mod update "file does not exist"

Open Be-Mann opened this issue 1 year ago • 2 comments

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`

SMMDebug-2024-10-31-17-45-37.zip

Be-Mann avatar Oct 31 '24 17:10 Be-Mann

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.

Be-Mann avatar Feb 02 '25 11:02 Be-Mann

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)

mircearoata avatar Feb 02 '25 14:02 mircearoata