From 485ace5f2a683911eda58734006ea9ac3cc68fd8 Mon Sep 17 00:00:00 2001 From: woro Date: Fri, 8 Feb 2008 13:47:51 +0000 Subject: Importing with mugglei now ignores absolute paths and warns. This should take care of quite a few beginner's problems git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1002 e10066b5-e1e2-0310-b819-94efdf66514b --- mg_db.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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(); -- cgit v1.2.3