liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.51k stars 265 forks source link

Upload: Create directory operation failed. #743

Open junjieit opened 4 years ago

junjieit commented 4 years ago

Describe the bug When using Chinese as the file name, overwrite upload failed.

[03-25 15:09:13] [info] local ➞ remote /Users/junjie/其他/未命名文件夹/dist/测试文件夹/测试.md
[03-25 15:10:06] [error] Error: Create directory operation failed.
    at v (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:110952)
    at d.<anonymous> (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:111675)
    at d.emit (events.js:203:13)
    at d._write (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:124497)
    at doWrite (_stream_writable.js:418:12)
    at writeOrBuffer (_stream_writable.js:402:5)
    at d.Writable.write (_stream_writable.js:302:11)
    at Socket.p (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:114046)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17) 

To Reproduce Steps to reproduce the behavior:

  1. Create a folder named "测试" and create an md file named "测试文本" under the "测试" folder.
  2. Right-click "测试文本.md" and click Upload
  3. It's Done.
  4. Click again to Upload.
  5. It's failed.

Expected behavior

  1. Folders named in Chinese can also be uploaded.
  2. Preview Chinese file name is not garbled.

Screenshots If applicable, add screenshots to help explain your problem. image image

Desktop (please complete the following information):

Extension Logs from Startup - required

[03-25 15:19:14] [debug] register command "Cancel All Transfer" from "./commandCancelAllTransfer.ts"
[03-25 15:19:14] [debug] register command "Config" from "./commandConfig.ts"
[03-25 15:19:14] [debug] register command "List Active Folder" from "./commandListActiveFolder.ts"
[03-25 15:19:14] [debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts"
[03-25 15:19:14] [debug] register command "Set Profile" from "./commandSetProfile.ts"
[03-25 15:19:14] [debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts"
[03-25 15:19:14] [debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts"
[03-25 15:19:14] [debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts"
[03-25 15:19:14] [debug] register command "Diff" from "./fileCommandDiff.ts"
[03-25 15:19:14] [debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts"
[03-25 15:19:14] [debug] register command "Download" from "./fileCommandDownload.ts"
[03-25 15:19:14] [debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts"
[03-25 15:19:14] [debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts"
[03-25 15:19:14] [debug] register command "Download File" from "./fileCommandDownloadFile.ts"
[03-25 15:19:14] [debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts"
[03-25 15:19:14] [debug] register command "Download Force" from "./fileCommandDownloadForce.ts"
[03-25 15:19:14] [debug] register command "Download Project" from "./fileCommandDownloadProject.ts"
[03-25 15:19:14] [debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts"
[03-25 15:19:14] [debug] register command "List" from "./fileCommandList.ts"
[03-25 15:19:14] [debug] register command "List All" from "./fileCommandListAll.ts"
[03-25 15:19:14] [debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts"
[03-25 15:19:14] [debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts"
[03-25 15:19:14] [debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts"
[03-25 15:19:14] [debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts"
[03-25 15:19:14] [debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts"
[03-25 15:19:14] [debug] register command "Upload" from "./fileCommandUpload.ts"
[03-25 15:19:14] [debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts"
[03-25 15:19:14] [debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts"
[03-25 15:19:14] [debug] register command "Upload File" from "./fileCommandUploadFile.ts"
[03-25 15:19:14] [debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts"
[03-25 15:19:14] [debug] register command "Upload Force" from "./fileCommandUploadForce.ts"
[03-25 15:19:14] [debug] register command "Upload Project" from "./fileCommandUploadProject.ts"
[03-25 15:19:14] [info] config at /Users/junjie/其他/未命名文件夹/dist {"remotePath":"/home/blog/blog","uploadOnSave":true,"downloadOnOpen":false,"ignore":[".vscode/**",".git/**",".DS_Store"],"concurrency":4,"protocol":"ftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"My Server","host":"******","password":"******","port":21,"username":"******","context":"dist","syncOption":{"delete":true,"update":true},"watcher":{"files":"dist/*","autoUpload":true,"autoDelete":true}}

operate log

[03-25 15:20:17] [trace] run command 'Upload File'
[03-25 15:20:17] [trace] handle upload file for /Users/junjie/其他/未命名文件夹/dist/测试文件夹/测试.md
[03-25 15:20:18] [debug] < '220 (vsFTPd 3.0.2)\r\n'
[03-25 15:20:18] [debug] > USER blog
[03-25 15:20:18] [debug] < '331 Please specify the password.\r\n'
[03-25 15:20:18] [debug] > PASS ******
[03-25 15:20:18] [debug] < '230 Login successful.\r\n'
[03-25 15:20:18] [debug] > FEAT
[03-25 15:20:18] [debug] > TYPE I
[03-25 15:20:18] [debug] < '200 Switching to Binary mode.\r\n'
[03-25 15:20:18] [debug] > PASV
[03-25 15:20:18] [debug] < '227 Entering Passive Mode (*,*,*,*,*,119).\r\n' # shield
[03-25 15:20:18] [debug] > LIST /home/blog/blog
[03-25 15:20:18] [debug] < '150 Here comes the directory listing.\r\n'
[03-25 15:20:18] [debug] < '226 Directory send OK.\r\n'
[03-25 15:20:18] [debug] > MKD /home/blog/blog/测试文件夹
[03-25 15:20:18] [debug] < '550 Create directory operation failed.\r\n'
[03-25 15:20:18] [debug] > MKD /home/blog/blog
[03-25 15:20:18] [debug] < '550 Create directory operation failed.\r\n'
[03-25 15:20:18] [debug] > MKD /home/blog
[03-25 15:20:18] [debug] < '550 Create directory operation failed.\r\n'
[03-25 15:20:18] [debug] > MKD /home
[03-25 15:20:18] [debug] < '550 Create directory operation failed.\r\n'
[03-25 15:20:18] [debug] > MKD /
[03-25 15:20:18] [debug] < '550 Create directory operation failed.\r\n'
[03-25 15:20:18] [error] Error: Create directory operation failed.
    at v (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:110952)
    at d.<anonymous> (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:111675)
    at d.emit (events.js:203:13)
    at d._write (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:124497)
    at doWrite (_stream_writable.js:418:12)
    at writeOrBuffer (_stream_writable.js:402:5)
    at d.Writable.write (_stream_writable.js:302:11)
    at Socket.p (/Users/junjie/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:114046)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17) 
[03-25 15:20:28] [debug] > NOOP
[03-25 15:20:38] [debug] > NOOP
jongha commented 4 years ago

I have a same issue.

[05-15 11:36:28] [error] Error: Create directory operation failed.
    at v (/Users/jongha/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:110952)
    at d.<anonymous> (/Users/jongha/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:111675)
    at d.emit (events.js:203:13)
    at d._write (/Users/jongha/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:124497)
    at doWrite (_stream_writable.js:418:12)
    at writeOrBuffer (_stream_writable.js:402:5)
    at d.Writable.write (_stream_writable.js:302:11)
    at Socket.p (/Users/jongha/.vscode/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:114046)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17) download /xxxx
sametpalitci commented 4 years ago

did you solve it?