]> git.lyx.org Git - features.git/blobdiff - src/support/filetools.C
various fixes from John, Martin and Kayvan, plus one of mine. Read ChangeLogs
[features.git] / src / support / filetools.C
index 07c577b4e02c8670998460b74358958a41a4a0aa..54d58d7b93e606cd6581d3f713fa8f3c92519bc2 100644 (file)
@@ -435,7 +435,8 @@ int DeleteAllFilesInDir (string const & path)
                                     << endl;
 
                bool deleted = true;
-               if (FileInfo(unlinkpath).isDir())
+               FileInfo fi(unlinkpath);
+               if (fi.isOK() && fi.isDir())
                        deleted = (DeleteAllFilesInDir(unlinkpath) == 0);
                deleted &= (lyx::unlink(unlinkpath) == 0);
                if (!deleted) {