If a file is not removed from disk during pack, a error log is created instead of a normal log

This commit is contained in:
Michiel Broek
2005-12-16 20:12:17 +00:00
parent eb8c383a90
commit 80ede4903f
3 changed files with 8 additions and 10 deletions

View File

@@ -105,11 +105,11 @@ void PackFileBase(void)
snprintf(fn, PATH_MAX, "%s/%s", area.Path, fdb.LName);
rc = unlink(fn);
if (rc && (errno != ENOENT))
Syslog('+', "Unlink %s failed, result %d", fn, rc);
WriteError("PackFileBase(): unlink %s failed, result %s", fn, strerror(rc));
snprintf(fn, PATH_MAX, "%s/%s", area.Path, fdb.Name);
rc = unlink(fn);
if (rc && (errno != ENOENT))
Syslog('+', "Unlink %s failed, result %d", fn, rc);
WriteError("PackFileBase(): unlink %s failed, result %s", fn, strerror(rc));
/*
* If a dotted version (thumbnail) exists, remove it silently
*/