]> git.lyx.org Git - features.git/blobdiff - src/support/rename.cpp
Remove warnings reported with gcc 4.3:
[features.git] / src / support / rename.cpp
index 45b1b45e861d339d77c4352fc14ae8a5cee69fc9..ec6fca53898e38e4c00c490450417cee3cd398a5 100644 (file)
@@ -25,12 +25,13 @@ using std::string;
 
 bool rename(FileName const & from, FileName const & to)
 {
-       if (::rename(from.toFilesystemEncoding().c_str(), to.toFilesystemEncoding().c_str()) == -1)
+       if (::rename(from.toFilesystemEncoding().c_str(), to.toFilesystemEncoding().c_str()) == -1) {
                if (copy(from, to)) {
                        unlink(from);
                        return true;
                } else
                        return false;
+       }
        return true;
 }