Skip to content

Commit

Permalink
Disabled delete handler, as it causes issues on Sublime Text 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiq0 authored and HexRx committed Aug 15, 2021
1 parent 0cf46b3 commit 2e06331
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Features
- Upload to FTP server on local file save
- Higly configurable
- Auto creates directory if doesn't exists on server and auto delete files on local file delete (configurable; **BETA** - Please report any issues. If any problem occured, you can disable delete handler patching by setting `"enableDeleteHandler"` option to false in global settings (`Preferences -> Package Settings -> Simple FTP Deploy -> Settings - User`) and restarting Sublime Text)
- Auto creates directory if doesn't exists on server

## How to Install

Expand Down
9 changes: 7 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def uploadTo(self, localRootDir, currentFullPath):
start = time.time()

fullFtpPath, currentFileName = self.parsePath(localRootDir, currentFullPath)

if fullFtpPath == '':
fullFtpPath = '/'

Expand Down Expand Up @@ -242,7 +242,12 @@ def on_post_save_async(self, view):
# To disable this feature, please set `enableDeleteHandler` setting to false in global settings
# WARNING: HIGHLY EXPERIMENTAL, OVERRIDES DEFAULT DELETE HANDLERS (imported from side_bar.py from Default.sublime-package)
# ==============
if sublime.load_settings("simple-ftp-deploy.sublime-settings").get("enableDeleteHandler", True):

# Disabled as it causes issues on Sublime Text 4

ST = 3000 if sublime.version() == '' else int(sublime.version())

if sublime.load_settings("simple-ftp-deploy.sublime-settings").get("enableDeleteHandler", False) and ST < 4000:
from Default.side_bar import *
import functools

Expand Down
2 changes: 1 addition & 1 deletion simple-ftp-deploy.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"enableDeleteHandler": true
"enableDeleteHandler": false
}

0 comments on commit 2e06331

Please sign in to comment.