Sublime Forum

Sublime Text 3 not removing file from external server (SSHFS)

#1

Hi Dear Sublime Comunnity,

I love sublime text but there is an annoying issue that I can’t fix. At work we connect to our server with SSHFS so we mount a partition locally over an SSH connection. I than open the folder I need to work in, in sublime text and everything works fine, except for file removal. For example I can rename a file but I can’t delete it. I right mouse click the file press delete file but nothing happens, first I thought I should probably refresh the folder, but no that is not the case. When i do a git status I don’t see a log of a file that has been removed. When I open the folder where the file that should have been deleted lives in I still see it.

It is pretty annoying! Because of this I had to switch to Visual Studio Code, but I prefer using sublime! Please help me fix this issue (if it is a problem that I can solve) or please fix it with an update!

Greetings from the Netherlands!

0 Likes

#2

any errors in the ST console (View menu -> Show Console)?
I’m guessing that the send2trash Python package fails to move the file to trash, so there should be a traceback exception showing the details of the error.

related:

there’s certainly no need to switch to a different editor due to this, one can just override the current behavior so that the “Delete File” item in the sidebar context menu will delete the file directly without trying to move it to the “recycle bin”, which may or may not exist on SSHFS mounts.

0 Likes

#3

thank you for your reply!

This is the console output:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1034, in run_
    return self.run(**args)
  File "/Applications/Sublime Text.app/Contents/MacOS/Packages/Default.sublime-package/side_bar.py", line 28, in run
  File "/Applications/Sublime Text.app/Contents/MacOS/Packages/Default.sublime-package/send2trash/plat_osx.py", line 44, in send2trash
  File "/Applications/Sublime Text.app/Contents/MacOS/Packages/Default.sublime-package/send2trash/plat_osx.py", line 33, in check_op_result
OSError: Directory not found
0 Likes

#4

Could you perhaps help me out with applying the patch? I have never applied a patch before…

0 Likes