morris / vinyl-ftp

Blazing fast vinyl adapter for FTP
Other
388 stars 31 forks source link

Clean function reports error when deleting directory containing files #79

Open jry2 opened 7 years ago

jry2 commented 7 years ago

I have delme directory containing file config.toml. Directory should be (and is) deleted during clean because it exists only on remote. But I get following error because config.toml was already deleted with directory:

...
RMDIR /delme
...
DEL   /delme/config.toml
Error: Delete operation failed.
...
morris commented 7 years ago

Does it actually break? Or is it just visible in the log? Could you post the rest of the log as well? Thanks!

djibarian commented 7 years ago

It breaks and stops the script but the files are deleted.

illycz commented 6 years ago

Same problem...

Part of log from Bitbucket pipelines:

[12:58:26] 'deploy' errored after 6.56 s
[12:58:26] Error: write after end
    at writeAfterEnd (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_writable.js:276:12)
    at ParallelTransform.Writable.write (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_writable.js:320:20)
    at PassThrough.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at PassThrough.emit (events.js:188:7)
    at PassThrough.Readable.read (_stream_readable.js:381:10)
    at flow (_stream_readable.js:761:34)
    at ParallelTransform.<anonymous> (_stream_readable.js:623:7)
    at emitNone (events.js:91:20)
    at ParallelTransform.emit (events.js:185:7)
    at onwriteDrain (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_writable.js:479:12)
    at afterWrite (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_writable.js:467:18)
    at onwrite (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_writable.js:461:7)
    at WritableState.onwrite (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_writable.js:169:5)
    at afterTransform (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_transform.js:104:3)
    at TransformState.afterTransform (/opt/atlassian/pipelines/agent/build/node_modules/readable-stream/lib/_stream_transform.js:79:12)
[12:58:26] DEL   /assets/images/ilustrace/5.jpg
[12:58:26] DISC 

Script delete ilustrace folder: [12:58:22] RMDIR /assets/images/ilustrace

And then will try delete file inside this folder: [12:58:26] DEL /assets/images/ilustrace/5.jpg