AvianFlu / ncp

Asynchronous recursive file copying with Node.js.
MIT License
681 stars 103 forks source link

Permissions error on copy #114

Open debelop13 opened 7 years ago

debelop13 commented 7 years ago

Hello!

I have permissions errors when I am using ncp,

Like this "Uncaught Error: EACCES: permission denied, open" or "Uncaught Error: EACCES: permission denied, mkdir".

Exists an option to solve this?

Thanks

samsungapore commented 6 years ago

i have the same type of error

Error: EPERM: operation not permitted, unlink 'C:\Users\Administrator\Documents\desktop.ini'
0|Mirai_Bo |     errno: -4048,
0|Mirai_Bo |     code: 'EPERM',
0|Mirai_Bo |     syscall: 'unlink',
0|Mirai_Bo |     path: 'C:\\Users\\Administrator\\Documents\\desktop.ini' }

And here is the code :

let ncp = require('ncp').ncp;

ncp.limit = 16;

setInterval(function () {
    ncp("../../Danganronpa 2 traduction FR/", "../../../Documents/", function (err) {
        if (err) {
            return console.error(err);
        }
        console.log('Backup of DR2 done');
    });
}, 60000 * 60 * 60 * 48);

The source folder is located on my dropbox shared folder.