Normalize symlinks in fsnotifier
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 1 Jun 2010 15:39:13 +0000 (19:39 +0400)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 1 Jun 2010 15:42:14 +0000 (19:42 +0400)
native/fsNotifier/linux/fsnotifier
native/fsNotifier/linux/fsnotifier64
native/fsNotifier/linux/inotify.c
native/fsNotifier/linux/make.sh

index 3d84ba68c1c23eb8f61adcb4d846f1f2d9f1d699..9290ab239af577c4d72f723b0bf171205b55ecf0 100755 (executable)
Binary files a/native/fsNotifier/linux/fsnotifier and b/native/fsNotifier/linux/fsnotifier differ
index 1c959e2ddfb8b2fa26bc195709dfd10f947b0216..3a573dd7a1830018ce482924f11e4d681962e654 100755 (executable)
Binary files a/native/fsNotifier/linux/fsnotifier64 and b/native/fsNotifier/linux/fsnotifier64 differ
index b3306e5c64ed03a36a7af295e7f958987bfaef97..411a6def1733bc084a44865beb0110a196f07741 100644 (file)
@@ -284,7 +284,9 @@ static int walk_tree(const char* path, watch_node* parent, array* ignores) {
 
 
 int watch(const char* root, array* ignores) {
-  return walk_tree(root, NULL, ignores);
+  char buf[PATH_MAX];
+  const char* normalized = realpath(root, buf);
+  return walk_tree((normalized != NULL ? normalized : root), NULL, ignores);
 }
 
 
index e2741da2778da68f05d4c4fb9c763aeb4e1f6480..f2ec112fc4064b51f4dd45af40b556d5cc155d79 100755 (executable)
@@ -1,2 +1,5 @@
+#!/bin/sh
+echo "compiling 32-bit version"
 gcc -O2 -m32 -Wall -std=c99 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -o fsnotifier main.c inotify.c util.c
+echo "compiling 64-bit version"
 gcc -O2 -m64 -Wall -std=c99 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -o fsnotifier64 main.c inotify.c util.c