copy_file(): prevent truncating file if src == dest
This commit is contained in:
parent
60657c9809
commit
04fe80b498
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue