fix bogus error when deleting temp dir

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@8628 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2004-04-08 10:16:45 +00:00
parent 7b060a4ea1
commit e0c03c9cc5
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-04-01 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* filetools.C (DeleteAllFilesInDir): delete directories with
rmdir(), unlink() does not work
2004-03-24 Jean-Marc Lasgouttes <lasgouttes@lyx.org> 2004-03-24 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* filetools.C (i18nLibFileSearch): simplify the logic a bit * filetools.C (i18nLibFileSearch): simplify the logic a bit

View File

@ -468,8 +468,10 @@ int DeleteAllFilesInDir(string const & path)
bool deleted = true; bool deleted = true;
FileInfo fi(unlinkpath); FileInfo fi(unlinkpath);
if (fi.isOK() && fi.isDir()) if (fi.isOK() && fi.isDir()) {
deleted = (DeleteAllFilesInDir(unlinkpath) == 0); deleted = (DeleteAllFilesInDir(unlinkpath) == 0);
deleted &= (lyx::rmdir(unlinkpath) == 0);
} else
deleted &= (lyx::unlink(unlinkpath) == 0); deleted &= (lyx::unlink(unlinkpath) == 0);
if (!deleted) { if (!deleted) {
Alert::err_alert(_("Error! Could not remove file:"), Alert::err_alert(_("Error! Could not remove file:"),

View File

@ -29,6 +29,8 @@ What's new
- when the autodetection of latex classes cannot be done for some - when the autodetection of latex classes cannot be done for some
reason, provide a sensible list of textclasses reason, provide a sensible list of textclasses
- fix an annoying "could not delete temp dir" warning
- honor correctly the various locale-related environment variables when - honor correctly the various locale-related environment variables when
looking for translated help files looking for translated help files