copy_file(): prevent truncating file if src == dest
o9000 o9000
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/util/common.c
→
src/util/common.c
@@ -35,6 +35,9 @@
void copy_file(const char *pathSrc, const char *pathDest) { + if (g_str_equal(pathSrc, pathDest)) + return; + FILE *fileSrc, *fileDest; char buffer[100]; int nb;