1
0
forked from 0ad/0ad

Don't convert paths here since it's already done by the caller (API change)

This was SVN commit r1449.
This commit is contained in:
Simon Brenner 2004-12-04 20:27:07 +00:00
parent 0c0d20d3eb
commit 936fc885a1

View File

@ -9,13 +9,11 @@
#include <fam.h> #include <fam.h>
static FAMConnection fc; static FAMConnection fc;
static bool initialized; static bool initialized=false;
static std::map<intptr_t, std::string> dirs; static std::map<intptr_t, std::string> dirs;
// path: portable and relative, must add current directory and convert to native int dir_add_watch(const char* const n_full_path, intptr_t* const watch)
// better to use a cached string from rel_chdir - secure
int dir_add_watch(const char* const path, intptr_t* const watch)
{ {
if(!initialized) if(!initialized)
{ {
@ -24,9 +22,6 @@ int dir_add_watch(const char* const path, intptr_t* const watch)
initialized = true; initialized = true;
} }
char n_full_path[PATH_MAX];
CHECK_ERR(file_make_native_path(path, n_full_path));
FAMRequest req; FAMRequest req;
if(FAMMonitorDirectory(&fc, n_full_path, &req, (void*)0) < 0) if(FAMMonitorDirectory(&fc, n_full_path, &req, (void*)0) < 0)
{ {