Editing file creates new one

I recently installed sublime text 2 plugin "SFTP" to work directly with my ftp server files. It connects to my ftp server correctly, but when I upload/save the file (in order to save the edits to the original file) it doesn't overrides the original file saving the updates, instead, it creates a new file in my ftp folder: If I edit "index.php" when i save it sublime text creates a new file "index.php.1" and the original index.php remains un-updated.

I tough that this could be a permission issue, but on my server the folder is with 777 on all users and files got 777 permission too.

Here is my sftp pluguin config file (sftp-config.json):

{
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help

// sftp, ftp or ftps
"type": "ftp",

"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": true,
"sync_skip_deletes": false,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,

"host": "mobility.unixdata.es",
"user": "admin",
"password": "mlcud",
//"port": "22",

"remote_path": "/Escriptori/htdocs/betamobility/testing",
"ignore_regexes": [
    ".sublime-(project|workspace)", "sftp-config(-altd?)?.json",
    "sftp-settings.json", "/venv/", ".svn", ".hg", ".git",
    ".bzr", "_darcs", "CVS", ".DS_Store", "Thumbs.db", "desktop.ini"
],
"file_permissions": "777",
"dir_permissions": "777",

//"extra_list_connections": 0,

"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ssh_key_file": "~/.ssh/id_rsa",
//"sftp_flags": ["-F", "/path/to/ssh_config"],

//"preserve_modification_times": false,
//"remote_time_offset_in_hours": 0,
//"remote_encoding": "utf-8",
//"remote_locale": "C",
}

Thanks for your help !!


Most likely this is due to a setting of the FTP server. See https://superuser.com/questions/333022/ftp-upload-overwrite-does-not-overwite-but-creates-file-ext-instead for an answer to a similar question.

If you are transferring files over a public network, I recommend you use SFTP instead of FTP.

链接地址: http://www.djcxy.com/p/62372.html

上一篇: 在Sublime Text中将选择转换为小写(或大写)?

下一篇: 编辑文件创建一个新文件