mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
CFileHelpers::copyFile - prevent possible compile error
This commit is contained in:
@@ -317,7 +317,7 @@ bool CFileHelpers::copyFile(const char *Src, const char *Dst, mode_t mode)
|
|||||||
unlink(Dst);
|
unlink(Dst);
|
||||||
if ((fd1 = open(Src, O_RDONLY)) < 0)
|
if ((fd1 = open(Src, O_RDONLY)) < 0)
|
||||||
return false;
|
return false;
|
||||||
if ((fd2 = open(Dst, O_WRONLY | O_CREAT)) < 0) {
|
if ((fd2 = open(Dst, O_WRONLY | O_CREAT, 0666)) < 0) {
|
||||||
close(fd1);
|
close(fd1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user