copy_file(): prevent truncating file if src == dest
This commit is contained in:
@@ -35,6 +35,9 @@
|
|||||||
|
|
||||||
void copy_file(const char *pathSrc, const char *pathDest)
|
void copy_file(const char *pathSrc, const char *pathDest)
|
||||||
{
|
{
|
||||||
|
if (g_str_equal(pathSrc, pathDest))
|
||||||
|
return;
|
||||||
|
|
||||||
FILE *fileSrc, *fileDest;
|
FILE *fileSrc, *fileDest;
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
int nb;
|
int nb;
|
||||||
|
|||||||
Reference in New Issue
Block a user