+TC 8.50b11-FTP & Sublime Text 3
Moderators: Hacker, petermad, Stefan2, white
+TC 8.50b11-FTP & Sublime Text 3
There is a problem with editing files through FTP of Total Commander 8.50b11 by Sublime Text 3.
I use Sublime Text 3 as a default editor by F4 button. And I use a new option "Plugins/FTP: Automatically re-upload changed files". So TC do not re-upload changed files by Sublime Text 3. But, for example, with Notepad++ everything is fine.
Without this new options everything is fine, but TC is still asking a question to replace file on FTP.
I use Sublime Text 3 as a default editor by F4 button. And I use a new option "Plugins/FTP: Automatically re-upload changed files". So TC do not re-upload changed files by Sublime Text 3. But, for example, with Notepad++ everything is fine.
Without this new options everything is fine, but TC is still asking a question to replace file on FTP.
Re: TC 8.50b11-FTP & Sublime Text 3
Can you copy the file while it is opened in Sublime Text 3?gpa_76 wrote: I use Sublime Text 3 as a default editor by F4 button. And I use a new option "Plugins/FTP: Automatically re-upload changed files". So TC do not re-upload changed files by Sublime Text 3.
I've tried to open file by ST3 edit it, save. Then without closing ST I've opened this file from the Temp folder by Notepad++ and changed it once again. Then I pressed Ctrl+S in Notepad++ file in a moment re-uploaded to FTP, with the changes made by ST3 and Notepad++.
So I think, ST3 do not make some trigger while saving a file, instead of Notepad++. But both of them save their changes into the file.
So I think, ST3 do not make some trigger while saving a file, instead of Notepad++. But both of them save their changes into the file.
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC relies on notifications from ReadDirectoryChangesW to be informed when a temporary file is changed. It's possible that sublime text uses a different name to save the file, e.g. the 8.3 name, or some low level functions which do not trigger the ReadDirectoryChangesW notification. Then TC cannot know that the file was changed.
Solution: Either turn off auto re-upload, or use a different editor.
Solution: Either turn off auto re-upload, or use a different editor.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
It seems to be a problem with Sublime Text 3 only - I just installed version 2 and version 3 beta, and only version 3 has this problem.
The name reported by watchdirs has a strange string appended:
0\subdir\originalname.txt~RFb2b812b.TMP
So what seems to happen is that Sublime Text 3 saves the file under a different name, and then deletes the original and renames the new file to the old name. So far TC was not watching rename operations in temp, so it never saw the original name. Watching for FILE_NOTIFY_CHANGE_FILE_NAME seems to fix the problem.
The name reported by watchdirs has a strange string appended:
0\subdir\originalname.txt~RFb2b812b.TMP
So what seems to happen is that Sublime Text 3 saves the file under a different name, and then deletes the original and renames the new file to the old name. So far TC was not watching rename operations in temp, so it never saw the original name. Watching for FILE_NOTIFY_CHANGE_FILE_NAME seems to fix the problem.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Code: Select all
"C:\Program Files (x86)\Sublime Text 3\sublime_text.exe" "%1"
- ghisler(Author)
- Site Admin
- Posts: 50541
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: