summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorworo <woro@e10066b5-e1e2-0310-b819-94efdf66514b>2008-02-08 13:47:51 +0000
committerworo <woro@e10066b5-e1e2-0310-b819-94efdf66514b>2008-02-08 13:47:51 +0000
commit485ace5f2a683911eda58734006ea9ac3cc68fd8 (patch)
tree9c63924f9ea30c696390953061edc351156380b8
parentbaad73e761e227cff32c045f05c663a548906a0f (diff)
downloadvdr-plugin-muggle-485ace5f2a683911eda58734006ea9ac3cc68fd8.tar.gz
vdr-plugin-muggle-485ace5f2a683911eda58734006ea9ac3cc68fd8.tar.bz2
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
-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();