+2004-04-01 Georg Baum <Georg.Baum@post.rwth-aachen.de>
+
+ * filetools.C (DeleteAllFilesInDir): delete directories with
+ rmdir(), unlink() does not work
+
2004-03-27 Angus Leeming <leeming@lyx.org>
* forkedcontr.C (child_handler): squash warning about a
bool deleted = true;
FileInfo fi(unlinkpath);
- if (fi.isOK() && fi.isDir())
+ if (fi.isOK() && fi.isDir()) {
deleted = (DeleteAllFilesInDir(unlinkpath) == 0);
- deleted &= (unlink(unlinkpath) == 0);
+ deleted &= (rmdir(unlinkpath) == 0);
+ } else
+ deleted &= (unlink(unlinkpath) == 0);
if (!deleted)
return_value = -1;
}