summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mg_db.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mg_db.c b/mg_db.c
index 2fb4f99..d4db53f 100644
--- a/mg_db.c
+++ b/mg_db.c
@@ -359,6 +359,13 @@ mgDb::Sync(char * const * path_argv)
if (fts)
{
while ( (ftsent = fts_read(fts)) != NULL)
+ {
+ if (ftsent->fts_path[0]=='/' && ftsent->fts_info!=FTS_DP)
+ {
+ mgWarning("Ignoring absolute path %s",ftsent->fts_path);
+ fts_set(fts,ftsent,FTS_SKIP);
+ continue;
+ }
switch (ftsent->fts_info) {
case FTS_DC:
mgDebug(1,"Ignoring directory %s, would cycle already seen %s",
@@ -408,6 +415,7 @@ mgDb::Sync(char * const * path_argv)
mgDebug(1,"Ignoring %s: unknown fts_info value %d",
ftsent->fts_path,ftsent->fts_info);
}
+ }
fts_close(fts);
}
Commit();