Open ihm-tswow opened 2 years ago
Solution is of course
directory: path.dirname(file),
fileName: path.basename(file),
i get this one
ENOENT: no such file or directory, unlink 'C:\Windows\System32\360safemon.dll.download'
i get this one
ENOENT: no such file or directory, unlink 'C:\Windows\System32360safemon.dll.download'
Did you try setting the "directory" attribute separately? Note that "fileName" refers to the name of the file itself, not the entire path
i get this one
ENOENT: no such file or directory, unlink 'C:\Windows\System32360safemon.dll.download'
Did you try setting the "directory" attribute separately? Note that "fileName" refers to the name of the file itself, not the entire path
my code
const downloader = new Downloader({
url: '****',
directory: path.join('C:', 'Windows', 'System32'),
onBeforeSave: (deducedName) => '360safemon.dll',
});
const res = await downloader.download();
i get this one
ENOENT: no such file or directory, unlink 'C:\Windows\System32360safemon.dll.download'
Did you try setting the "directory" attribute separately? Note that "fileName" refers to the name of the file itself, not the entire path
my code
const downloader = new Downloader({ url: '****', directory: path.join('C:', 'Windows', 'System32'), onBeforeSave: (deducedName) => '360safemon.dll', }); const res = await downloader.download();
you're getting this error due to permissions issue. windows doesn't allow free access to this directory. My error handling in this procedure just swallows the original error, which made it unclear:
'EPERM: operation not permitted, open 'C:\Windows\System32\360safemon.dll.download''
i get this one
ENOENT: no such file or directory, unlink 'C:\Windows\System32360safemon.dll.download'
Did you try setting the "directory" attribute separately? Note that "fileName" refers to the name of the file itself, not the entire path
my code
const downloader = new Downloader({ url: '****', directory: path.join('C:', 'Windows', 'System32'), onBeforeSave: (deducedName) => '360safemon.dll', }); const res = await downloader.download();
you're getting this error due to permissions issue. windows doesn't allow free access to this directory. My error handling in this procedure just swallows the original error, which made it unclear:
'EPERM: operation not permitted, open 'C:\Windows\System32\360safemon.dll.download''
ok, thanks
Trying to set
fileName
to an absolute path on windows stacks it on top of the working directory.How we use it:
For a run where
resfp(file)
resolves toC:\tswow-build-2\cmake-3.18.3-win64-x64.zip
and working directory isD:\dev\wow\tswow\
, I get the following error:ENOENT: no such file or directory, unlink 'D:\dev\wow\tswow\C:\tswow-build-2\cmake-3.18.3-win64-x64.zip.download'