Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not possible to move files in Windows (v7) #8

Open
miukki opened this issue Jan 22, 2014 · 4 comments
Open

not possible to move files in Windows (v7) #8

miukki opened this issue Jan 22, 2014 · 4 comments

Comments

@miukki
Copy link

miukki commented Jan 22, 2014

mv(path.resolve('..', 'file'), path.resolve('..', 'empty1'), function(err){console.log(err)})
Error {errno: 50, code: "EPERM", path: "C:\miukki\file"}

@justinbmeyer
Copy link

I'm seeing this too.

@pablomaurer
Copy link

oh nooo :(

@dxcqcv
Copy link

dxcqcv commented Oct 9, 2017

the same error in windows 7

        const str = fs.createReadStream(path, 'utf8')
          .pipe(replaceStream(makeRegex ,replaceFn.bind(this, replaceObj), {maxMatchLen: 5000}))
          
        const tempPath = await tempWrite(str)
        await promiseMv(tempPath, path)

function promiseMv(sourceFile, destFile) {
  return new Promise((res, rej) => {
    mv(sourceFile, destFile, {mkdirp: true}, function(err) {
      if(err) rej(err)
      res()
    })
  })
}
(node:6448) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: EPERM: operation
 not permitted, rename 'D:\Users\SHANGW~1\AppData\Local\Temp\e89c0fcd-88a4-40f6-85e6-982dfca3f4f2' -> 'D:\dev\github
\auto-activity\static\projects\lotteryNine-12\index.html'

@vasyl-shumskyi
Copy link

vasyl-shumskyi commented Jul 16, 2018

Just tested the simplest scenario on Windows 7. Can't reproduce in regular usage :

mv ('file', 'dir1\\file2', (err) => { err ? console.error(err) : console.log('moved') })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants