summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Eefting <edwin@datux.nl>2013-01-23 21:18:38 (GMT)
committer Edwin Eefting <edwin@datux.nl>2013-01-23 21:18:38 (GMT)
commit6053845b64c6026ca3861f0f6106dff1cd7c9bb3 (patch)
tree471440cafab9efea66ee15c5189789f1ef7bf1da
parent58b1563c8306f4bb199dba53e28255233412e7ae (diff)
empty path bugfix
-rw-r--r--modules/pl_dir.module/module.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/pl_dir.module/module.cpp b/modules/pl_dir.module/module.cpp
index fe27588..b1274bc 100644
--- a/modules/pl_dir.module/module.cpp
+++ b/modules/pl_dir.module/module.cpp
@@ -190,6 +190,12 @@ namespace pl
enum Erecursion { RECURSE, DONT_RECURSE };
path movePath(path rootPath, path currentPath, string sortField, Edirection direction, Erecursion recursion, CsortedDir::Efiletype filetype)
{
+ DEB(
+ "currentPath=" << currentPath.string() <<
+ " sortField=" << sortField <<
+ " direction=" << direction <<
+ " recursion=" << recursion <<
+ " filetype=" << filetype);
//determine the path we should get the initial listing of:
path listPath;
@@ -290,10 +296,10 @@ namespace pl
}
}
- while(currentPath!=startPath);
+ while(listPath!=startPath); //prevent inifinte loops if we dont find anything
- //nothing found, just return currentPath
- return(currentPath);
+ DEB("nothing found, returning " << startPath)
+ return(startPath);
}
class Citer