diff options
author | Yorhel <git@yorhel.nl> | 2013-06-09 08:09:34 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2013-06-09 08:11:03 +0200 |
commit | 2e4ee619072115882a965aae45514da02d29ae98 (patch) | |
tree | b8a43ceaca7c2444279aa7a8cdeb551c369886a1 | |
parent | 2cbb8e0321e2710ef3c9a9a76611dae89060cc86 (diff) |
share: Fix bug with scanning nested vpaths + remove some debug code
The special handling required for the root directory '/' compared to any
subdirectory '/blah' is a minefield...
-rw-r--r-- | src/share/conf.c | 4 | ||||
-rw-r--r-- | src/share/scan.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/share/conf.c b/src/share/conf.c index c30dd88..410bc6e 100644 --- a/src/share/conf.c +++ b/src/share/conf.c @@ -430,10 +430,8 @@ static void share_manager_load() { * removed from the database before the new Precedence values were saved. */ size_t i; - for(i=0; i<share_conf_shares.n; i++) { + for(i=0; i<share_conf_shares.n; i++) share_fixprecedence(share_conf_shares.a[i], false); - share_scan(share_conf_shares.a[i], share_conf_shares.a[i]->root); - } } diff --git a/src/share/scan.c b/src/share/scan.c index cdf4179..f1e7299 100644 --- a/src/share/scan.c +++ b/src/share/scan.c @@ -357,8 +357,7 @@ static void share_scan_dir_addvpath(share_flv_t *dest, const char *vpath, share_ if(!path_isancestor(vpath, ps)) return; - ydebug("vpath = %s, ps = %s", vpath, ps); - ps += strlen(vpath)+1; + ps += vpath[1] ? strlen(vpath)+1 : 1; char *end = ps; while(*end && *end != '/') end++; |