Bug 1338086 - Remove useless else blocks in order to reduce complexity in toolkit/mozapps/update/updater/ r?ehsan
MozReview-Commit-ID: 3X4CIucTfGG
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -894,19 +894,18 @@ static int rename_file(const NS_tchar *s
return READ_ERROR;
}
if (!S_ISREG(spathInfo.st_mode)) {
if (allowDirs && !S_ISDIR(spathInfo.st_mode)) {
LOG(("rename_file: path present, but not a file: " LOG_S ", err: %d",
spath, errno));
return RENAME_ERROR_EXPECTED_FILE;
- } else {
- LOG(("rename_file: proceeding to rename the directory"));
}
+ LOG(("rename_file: proceeding to rename the directory"));
}
if (!NS_taccess(dpath, F_OK)) {
if (ensure_remove(dpath)) {
LOG(("rename_file: destination file exists and could not be " \
"removed: " LOG_S, dpath));
return WRITE_ERROR_DELETE_FILE;
}