satiromarra / vscode-sftp

Super fast sftp/ftp extension for VS Code
Other
23 stars 3 forks source link

Rename Feature Bug #66

Closed jh0320p closed 1 year ago

jh0320p commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Renaming files in FTP project returns error "Rename failed."

To Reproduce Steps to reproduce the behavior:

  1. Add any FTP server with following config :
    {
        "name": *[valid name]*,
        "host": *[working host]*,
        "protocol": "ftp",
        "uploadOnSave": true,
        "useTempFile": false,
        "port": 21000,
        "username": *[working name]*,
        "ignore": [
            ".vscode",
            ".git",
            ".DS_Store",
            ".github/**",
            ".ci"
        ],
        "context": *[workspace dir]*,
        "remotePath": "~/",
        "watcher": {
            "files": "statics/**/*",
            "autoUpload": true,
            "autoDelete": true
        },
        "remoteExplorer": {
            "filesExclude": [
                ".git",
                ".vscode",
                ".github"
            ]
        },
        "password": *[working password]*,
        "charset": "ascii",
        "showHidden": false,
        "profiles": {}
    },
  2. Open the file you want to edit
  3. Try rename option
  4. See the result
  5. Same result for config settings "useTempFile": true, "autoUpload": false, "autoDelete": false

Expected behavior A clear and concise description of what you expected to happen. succeed in renaming file

Desktop (please complete the following information):

Extension Logs from Startup - required

[2023-06-22 15:13:21] [debug] > NOOP
[2023-06-22 15:13:28] [trace] run command 'Rename File'
[2023-06-22 15:13:31] [trace] handle renameRemoteFile for /Users/*[username]*/*[path_to_workspace]*/htdocs/mypage/pwd_change.php
[2023-06-22 15:13:31] [debug] > RNFR ~/htdocs/mypage/pwd_change.php
[2023-06-22 15:13:31] [debug] < '350 Ready for RNTO.\r\n'
[2023-06-22 15:13:31] [debug] > RNTO /~/htdocs/mypage/pwd_change1.php
[2023-06-22 15:13:31] [debug] < '550 Rename failed.\r\n'
[2023-06-22 15:13:31] [error] Error: Rename failed.
    at F (/Users/*[username]*/.vscode/extensions/satiromarra.code-sftp-1.18.1/dist/extension.js:2:70809)
    at p.<anonymous> (/Users/felix/.vscode/extensions/satiromarra.code-sftp-1.18.1/dist/extension.js:2:71533)
    at p.emit (node:events:513:28)
    at p._write (/Users/*[username]*/.vscode/extensions/satiromarra.code-sftp-1.18.1/dist/extension.js:2:84370)
    at writeOrBuffer (node:internal/streams/writable:391:12)
    at _write (node:internal/streams/writable:332:10)
    at p.Writable.write (node:internal/streams/writable:336:10)
    at Socket.h (/Users/*[username]*/.vscode/extensions/satiromarra.code-sftp-1.18.1/dist/extension.js:2:73905)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) 

Just replaced personal info with [info]

satiromarra commented 1 year ago

@jh0320p Could you remove the option? "remotePath": "~/",

jh0320p commented 1 year ago

@satiromarra Hi. Removing that option solved the issue. Thanks a lot!