gaze icon indicating copy to clipboard operation
gaze copied to clipboard

Everything goes wrong after 'renamed'

Open novli opened this issue 10 years ago • 4 comments

Windows 7. 0.6.4. Pathwatcher. I use gaze with gulp-watch. Coffee:

...
.gaze
  .on 'changed', (path) ->
    console.log 'Changed: '+path
  .on 'added', (path) ->
    console.log 'Added: '+path
  .on 'deleted', (path) ->
    console.log 'Deleted: '+path
  .on 'renamed', (newPath, oldPath) ->
    console.log 'New: '+newPath
    console.log 'Old: '+oldPath

When I rename a watched file, I see this:

New: D:\Test\Dir\New.ext
Old: D:\Test\Dir\Old.ext
[gulp] New.ext was renamed
Changed: D:\Test\Dir\Old.ext
[gulp] Old.ext was changed

If I change the New.ext contents, I see this:

Changed: D:\Test\Dir\Old.ext
[gulp] Old.ext was changed

If I rename New.ext to Newer.ext, I see this:

New: D:\Test\Dir\Newer.ext
Old: D:\Test\Dir\Old.ext
[gulp] Newer.ext was renamed
Changed: D:\Test\Dir\Old.ext
[gulp] Old.ext was changed

gulp-watch even created New.ext and Newer.ext files as it was expected, but the change of New.ext wrote to nowhere. It seems like 'rename' keeps the old path of the watched file instead of the new one.

If I disable Pathwatcher, everything works fine.

novli avatar Apr 26 '14 23:04 novli

I confirm the issue, directly using gaze, on OS X 10.9. For example, with the README.md example, on the `all' event, in the case of soft file removal (moving to trash):

src/foo.coffee was added
src/foo.coffee was changed
../../../../.Trash/foo.coffee was renamed
src/foo.coffee was added

And then, it won't generate any more event ever for this specific file, when it is changed anew.

jeanlauliac avatar May 28 '14 08:05 jeanlauliac

Is there any progress on this? The problem described by @jeanlauliac (reporting 'deleted' as 'renamed' on Mac OS X) is a major bug. Is there an old version I can use instead that doesn't have the 'renamed' bug?

callumlocke avatar Jul 30 '14 13:07 callumlocke

Feel free to use [email protected] atm if this is a major issues for you.

shama avatar Jul 30 '14 15:07 shama

I'm using [email protected] at OS X. It seems 'renamed' will be reported as 'deleted'.

abnerlee avatar Jun 08 '15 15:06 abnerlee