From e5578eebee850434fcc954b04d0e906faa062462 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 7 Aug 2012 09:33:46 -0700 Subject: [PATCH] Revert "DO NOT COMMIT THIS" This reverts commit 148822386932ac4ad414e504ee86858cb8512616. --- Atom/src/PathWatcher.mm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Atom/src/PathWatcher.mm b/Atom/src/PathWatcher.mm index 667a52a60..fef172750 100644 --- a/Atom/src/PathWatcher.mm +++ b/Atom/src/PathWatcher.mm @@ -240,7 +240,7 @@ static NSMutableArray *gPathWatchers; NSNumber *fdNumber = [NSNumber numberWithInt:event.ident]; NSString *eventFlag = nil; NSString *path = [[[self pathForFileDescriptor:fdNumber] retain] autorelease]; - NSString *newPath = nil; + NSString *newPath = nil; if (event.fflags & NOTE_WRITE) { eventFlag = @"contents-change"; @@ -250,11 +250,6 @@ static NSMutableArray *gPathWatchers; [self updatePath:path forFileDescriptor:fdNumber]; } else if (event.fflags & NOTE_DELETE) { - close((int)event.ident); - int checkFd = open([path fileSystemRepresentation], O_EVTONLY, 0 ); - - printf("remove %X %d %s\n", event.fflags, checkFd, [path UTF8String]); - eventFlag = @"remove"; } else if (event.fflags & NOTE_RENAME) { @@ -263,7 +258,7 @@ static NSMutableArray *gPathWatchers; fcntl((int)event.ident, F_GETPATH, &pathBuffer); newPath = [NSString stringWithUTF8String:pathBuffer]; } - + NSDictionary *callbacks; @synchronized(self) { callbacks = [NSDictionary dictionaryWithDictionary:[_callbacksByFileDescriptor objectForKey:fdNumber]];