Sublime Forum

SFTP - Saving project workspace

#1

With SublimeText2 I used to be able to open a bunch of remote files using the wbond SFTP plugin, and save the project. When I came back to that project it would re-open all the tabs, and re-sync the files down from the SFTP server.

This way I could be working on multiple remote files on different projects and switch between them - and/or be able to close Sublime Text if I ever needed to reboot or anything.

Now with Sublime3, this no longer seems to work. When I save a project, the project file contains nothing but two characters - “{}”, so when I open that, I get nothing.

I tried doing it with a Workspace instead of a project, but when I double click the “test.sublime-workspace” file, it opens the workspace file itself in sublime, and shows its raw JSON contents, rather than parsing it and doing something with it.

Am I doing something wrong - or did something change since Sublime 2? Or is something broken?

0 Likes

#2

Is there somewhere else i can post this to get support?

0 Likes

#3

see https://wbond.net/sublime_packages/sftp/support

0 Likes

#4

I’m assuming you’re using the ‘Server’ workflow? I fixed this in my SFTP plugin install. I uncompiled the sftp/*.pyc files and started poking around. I found a line of code that explicitly deleted the directory that the downloaded files are stored in, so, no wonder this didn’t work. Its the:

DelayedDeleteThread(dirname(tmp_dir), sublime.active_window().id()).start()

call in listeners.py

If you go poking around in here changing temp directories (like I did to figure out whats going on), be VERY CAREFUL. That dirname(tmp_dir) picked the parent directory of a directory I hard coded for testing, and deleted an important directory, so I had to roll an important directory back to a two day old backup.

I sent a message via that support request, hopefully the maintainer puts some sane code in here instead of the code that basically completely breaks ST3 projects for no reason. But considering that this post is well over two years old, I guess its unlikely?

If you’re still looking to get this going, shout out here and I’ll put something up on github or something.

0 Likes