-
Notifications
You must be signed in to change notification settings - Fork 1
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
Subdirectories not deleted during sync-glob --watch
on Windows 10 / Linux
#39
Comments
sync-glob --watch
in Windows 10
sync-glob --watch
in Windows 10sync-glob --watch
on Windows 10
@KeithGillette |
I just run the following test on my Mac node bin/sync-glob.js --watch 'test/**/*' tmp/ Initial Copy
Deleting
Deleting
|
So double I just created an empty sub directory and run following test: node bin/sync-glob.js --watch 'test/**/*' tmp/
Delete
@KeithGillette |
@KeithGillette
|
@KeithGillette |
Hi @AndyOGo. I get absolutely no errors in the console even with the |
@KeithGillette Okay, what a bummer. Thank you for instant feedback. |
Bummer, indeed. My current needs don't actually require globbing functionality, so I have fallen back to |
Sure, use the tool which satisfies your needs best. Hmh, interesting. But I don't think so because I will keep an eye on this and try to get access to a windows 10 box, so that I can prove what is going on exactly. |
Thanks again, @AndyOGo. While we can get by with a straight directory sync now, I foresee use cases for globbing in my project in the future, so I hope you are able to resolve the issue. If it would be helpful in testing, I can get you access to a virtualized Windows 10 environment on Azure. |
@KeithGillette Thanks for your offer to help. |
I just tested it on windows 10 and unfortunately I found even more bugs.
|
I just installed Error watching file for changes: EPERM I tracked the call stack down and chokidar is emitting this error |
I got a failing test now: https://ci.appveyor.com/project/AndyOGo/node-sync-glob/build/1.0.71/job/mvjw85ufp2bhxxvg#L789 FAIL test\sync.spec.js (8.87s)
● node-sync-glob watch › should sync empty sub directory deletion
ENOTEMPTY: directory not empty, rmdir 'C:\projects\node-sync-glob\tmp\mock'
at Object.fs.rmdirSync (fs.js:856:18)
at rmkidsSync (node_modules\fs-extra\lib\remove\rimraf.js:300:11)
at rmdirSync (node_modules\fs-extra\lib\remove\rimraf.js:289:7)
at rimrafSync (node_modules\fs-extra\lib\remove\rimraf.js:254:7)
at node_modules\fs-extra\lib\remove\rimraf.js:298:5
at Array.forEach (native)
at rmkidsSync (node_modules\fs-extra\lib\remove\rimraf.js:297:26)
at rmdirSync (node_modules\fs-extra\lib\remove\rimraf.js:289:7)
at Function.rimrafSync [as sync] (node_modules\fs-extra\lib\remove\rimraf.js:254:7)
at Object.removeSync (node_modules\fs-extra\lib\remove\index.js:4:17)
● node-sync-glob watch › should sync empty sub directory deletion
EPERM: operation not permitted, mkdir 'C:\projects\node-sync-glob\tmp\mock\bar\empty'
at Object.fs.mkdirSync (fs.js:895:18)
at Object.mkdirsSync (node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:29:9)
at Object.ensureDirSync (test\helpers.js:13:154)
at Object.<anonymous> (test\sync.spec.js:98:43)
node-sync-glob watch |
Well the empty test dir Windows: https://ci.appveyor.com/project/AndyOGo/node-sync-glob/build/1.0.75/job/yp5tk3x4sm246vj6#L865 console.log src\index.js:94
[ 'tmp\\mock\\@org',
'tmp\\mock\\@org\\a.txt',
'tmp\\mock\\@org\\b.txt',
'tmp\\mock\\@org\\d.txt',
'tmp\\mock\\a.txt',
'tmp\\mock\\b.txt',
'tmp\\mock\\bar',
'tmp\\mock\\bar\\c.txt',
'tmp\\mock\\foo',
'tmp\\mock\\foo\\b.txt',
'tmp\\mock\\foo\\d.txt',
'tmp\\mock\\transform.js' ]
FAIL test\sync.spec.js (8.917s)
● node-sync-glob watch › should sync empty sub directory deletion
ENOTEMPTY: directory not empty, rmdir 'C:\projects\node-sync-glob\tmp\mock'
at Object.fs.rmdirSync (fs.js:856:18)
at rmkidsSync (node_modules\fs-extra\lib\remove\rimraf.js:300:11)
at rmdirSync (node_modules\fs-extra\lib\remove\rimraf.js:289:7)
at rimrafSync (node_modules\fs-extra\lib\remove\rimraf.js:254:7)
at node_modules\fs-extra\lib\remove\rimraf.js:298:5
at Array.forEach (native)
at rmkidsSync (node_modules\fs-extra\lib\remove\rimraf.js:297:26)
at rmdirSync (node_modules\fs-extra\lib\remove\rimraf.js:289:7)
at Function.rimrafSync [as sync] (node_modules\fs-extra\lib\remove\rimraf.js:254:7)
at Object.removeSync (node_modules\fs-extra\lib\remove\index.js:4:17)
● node-sync-glob watch › should sync empty sub directory deletion
EPERM: operation not permitted, mkdir 'C:\projects\node-sync-glob\tmp\mock\bar\empty'
at Object.fs.mkdirSync (fs.js:895:18)
at Object.mkdirsSync (node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:29:9)
at Object.ensureDirSync (test\helpers.js:13:154)
at Object.<anonymous> (test\sync.spec.js:98:43) In contrast OS X: https://travis-ci.org/AndyOGo/node-sync-glob/jobs/220861943#L1059 console.log src/index.js:94
[ 'tmp/mock/@org',
'tmp/mock/@org/a.txt',
'tmp/mock/@org/b.txt',
'tmp/mock/@org/d.txt',
'tmp/mock/a.txt',
'tmp/mock/b.txt',
'tmp/mock/bar',
'tmp/mock/bar/c.txt',
'tmp/mock/bar/empty',
'tmp/mock/foo',
'tmp/mock/foo/b.txt',
'tmp/mock/foo/d.txt',
'tmp/mock/transform.js' ]
PASS test/sync.spec.js (9.997s)
node-sync-glob watch
✓ should sync a file (2402ms)
✓ should sync an array of files (2397ms)
✓ should sync a directory (2429ms)
✓ should sync globstar (2428ms)
✓ should sync empty sub directory deletion (196ms) |
console.log src\index.js:101
sources: tmp/mock/**/* -> tmp/mock/**/*
console.log src\index.js:102
target: tmp/sync -> tmp\sync
console.log src\index.js:103
globed files:
tmp\mock\@org
tmp\mock\@org\a.txt
tmp\mock\@org\b.txt
tmp\mock\@org\d.txt
tmp\mock\a.txt
tmp\mock\b.txt
tmp\mock\bar
tmp\mock\bar\c.txt
tmp\mock\foo
tmp\mock\foo\b.txt
tmp\mock\foo\d.txt
tmp\mock\transform.js
console.log src\index.js:237
RAW: change -> b.txt
console.log src\index.js:238
{ watchedPath: 'tmp\\mock\\foo' }
console.log src\index.js:237
RAW: change -> b.txt
console.log src\index.js:238
{ watchedPath: 'tmp\\mock\\foo\\b.txt' }
console.log src\index.js:237
RAW: rename -> d.txt
console.log src\index.js:238
{ watchedPath: 'tmp\\mock\\foo' }
console.log src\index.js:237
RAW: rename -> d.txt
console.log src\index.js:238
{ watchedPath: 'tmp\\mock\\foo\\d.txt' }
console.log src\index.js:237
RAW: change -> foo
console.log src\index.js:238
{ watchedPath: 'tmp/mock' }
FAIL test\sync.spec.js (8.937s)
● node-sync-glob watch › should sync empty sub directory deletion
ENOTEMPTY: directory not empty, rmdir 'C:\projects\node-sync-glob\tmp\mock'
at Object.fs.rmdirSync (fs.js:856:18)
at rmkidsSync (node_modules\fs-extra\lib\remove\rimraf.js:292:11)
at rmdirSync (node_modules\fs-extra\lib\remove\rimraf.js:283:7)
at rimrafSync (node_modules\fs-extra\lib\remove\rimraf.js:252:7)
at options.readdirSync.forEach.f (node_modules\fs-extra\lib\remove\rimraf.js:291:39)
at Array.forEach (native)
at rmkidsSync (node_modules\fs-extra\lib\remove\rimraf.js:291:26)
at rmdirSync (node_modules\fs-extra\lib\remove\rimraf.js:283:7)
at Function.rimrafSync [as sync] (node_modules\fs-extra\lib\remove\rimraf.js:252:7)
at Object.removeSync (node_modules\fs-extra\lib\remove\index.js:6:17)
● node-sync-glob watch › should sync empty sub directory deletion
EPERM: operation not permitted, mkdir 'C:\projects\node-sync-glob\tmp\mock\bar\empty'
at Object.fs.mkdirSync (fs.js:895:18)
at Object.mkdirsSync (node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:31:9)
at Object.ensureDirSync (test\helpers.js:13:154)
at Object.<anonymous> (test\sync.spec.js:100:45)
node-sync-glob watch
√ should sync a file (2190ms)
√ should sync an array of files (2180ms)
√ should sync a directory (2230ms)
√ should sync globstar (2243ms)
× should sync empty sub directory deletion
console.log test\sync.spec.js:99
EXISTS: tmp/mock/bar -> false
console.log test\sync.spec.js:120
{ Error: EPERM: operation not permitted, mkdir 'C:\projects\node-sync-glob\tmp\mock\bar\empty'
at Object.fs.mkdirSync (fs.js:895:18)
at Object.mkdirsSync (C:\projects\node-sync-glob\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:31:9)
at Object.ensureDirSync (C:\projects\node-sync-glob\test\helpers.js:13:154)
at Object.<anonymous> (C:\projects\node-sync-glob\test\sync.spec.js:100:45)
at attemptAsync (C:\projects\node-sync-glob\node_modules\jest-jasmine2\vendor\jasmine-2.5.2.js:1984:24)
at QueueRunner.run (C:\projects\node-sync-glob\node_modules\jest-jasmine2\vendor\jasmine-2.5.2.js:1939:9)
at C:\projects\node-sync-glob\node_modules\jest-jasmine2\vendor\jasmine-2.5.2.js:1966:16
at C:\projects\node-sync-glob\node_modules\jest-jasmine2\vendor\jasmine-2.5.2.js:1909:9
at attemptAsync (C:\projects\node-sync-glob\node_modules\jest-jasmine2\vendor\jasmine-2.5.2.js:1987:9)
at QueueRunner.run (C:\projects\node-sync-glob\node_modules\jest-jasmine2\vendor\jasmine-2.5.2.js:1939:9)
errno: -4048,
code: 'EPERM',
syscall: 'mkdir',
path: 'C:\\projects\\node-sync-glob\\tmp\\mock\\bar\\empty' }
PASS test\lib\sources-bases.spec.js |
sync-glob --watch
on Windows 10sync-glob --watch
on Windows 10 / Linux
A new file watcher just got released for node 😱 |
When running:
sync-glob --watch 'source/*' destination
or:
sync-glob --watch 'source/**/*' destination
directories and files are copied and updated (recursively) from source to destination, but the watch does not delete subdirectories deleted in
source
during the watch.With:
The text was updated successfully, but these errors were encountered: