Blob Blame History Raw
diff -up 0ad-0.0.11-alpha/source/lib/sysdep/os/linux/dir_watch_fam.cpp.orig 0ad-0.0.11-alpha/source/lib/sysdep/os/linux/dir_watch_fam.cpp
--- 0ad-0.0.11-alpha/source/lib/sysdep/os/linux/dir_watch_fam.cpp.orig	2012-09-08 09:44:27.676395177 -0300
+++ 0ad-0.0.11-alpha/source/lib/sysdep/os/linux/dir_watch_fam.cpp	2012-09-08 09:45:10.303439436 -0300
@@ -173,6 +173,8 @@ static void* fam_event_loop(void*)
 
 Status dir_watch_Add(const OsPath& path, PDirWatch& dirWatch)
 {
+	char	resolved[PATH_MAX + 1];
+
 	// init already failed; don't try again or complain
 	if(initialized == -1)
 		return ERR::FAIL;	// NOWARN
@@ -205,7 +207,10 @@ Status dir_watch_Add(const OsPath& path,
 	// not worthwhile
 
 	FAMRequest req;
-	if(FAMMonitorDirectory(&fc, OsString(path).c_str(), &req, tmpDirWatch.get()) < 0)
+
+	FAMNoExists(&fc);
+
+	if(FAMMonitorDirectory(&fc, realpath(OsString(path).c_str(), resolved), &req, tmpDirWatch.get()) < 0)
 	{
 		debug_warn(L"res_watch_dir failed!");
 		WARN_RETURN(ERR::FAIL);	// no way of getting error code?