Open Leftium opened 1 year ago
windows-trash.exe
subst
P:\tmp>subst &REM Show subst virtual drive maping: P:\: => V:\Insync\Dropbox\p P:\tmp>windows-trash.exe FILE_TO_TRASH &REM Running from virtual drive silently fails to remove file: P:\tmp>dir 06/18/2023 12:15 AM 0 FILE_TO_TRASH 06/17/2023 11:10 PM 28,672 windows-trash.exe P:\tmp>v: &REM Switch to non-virtual drive. V:\Insync\Dropbox\p\tmp>windows-trash.exe FILE_TO_TRASH &REM Running from non-virtual drive successfully to removes file: V:\Insync\Dropbox\p\tmp>dir 06/17/2023 11:10 PM 28,672 windows-trash.exe
I was trying to debug or workaround this error:
/p/tmp $ trash FILE_TO_TRASH Error: Command failed: V:\pnpm-home\global\5\.pnpm\trash@6.1.1\node_modules\trash\lib\windows-trash.exe P:\tmp\FILE_TO_TRASH at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:513:28) at maybeClose (node:internal/child_process:1091:16) at ChildProcess._handle.onexit (node:internal/child_process:302:5)
The error does not happen if not in a virtual drive:
/v/Insync/Dropbox/p/tmp $ trash FILE_TO_TRASH /v/Insync/Dropbox/p/tmp $ ls windows-trash.exe*
Also the error only occurs after trash-cli version 3.0.0. (So my workaround is to use version 2.0.0)
Environment:
windows-trash.exe
silently fails to remove files if the path is in asubst
virtual drive.windows-trash.exe
successfully removes the same files if the full, non-virtual drive paths are used.I was trying to debug or workaround this error:
The error does not happen if not in a virtual drive:
Also the error only occurs after trash-cli version 3.0.0. (So my workaround is to use version 2.0.0)
Environment: