Fix error checking on file and directory deletion.

This commit is contained in:
2017-07-10 22:25:46 +02:00
parent 74b4b9c8c6
commit a068022148

View File

@@ -254,12 +254,12 @@ void AccionFileNodeAux_Copy(char *pathOrig, char *pathDest) {
}
}
void AccionFileNodeAux_Delete(char *pathOrig, char *pathDest) {
if (File_IsDirectory(pathDest)) {
if (File_DeleteDirectory(pathDest)) {
if (File_IsDirectory(pathDest) == 0) {
if (File_DeleteDirectory(pathDest) == 0) {
Print("Error Deleting Directory: %s, %s\n", pathDest, GetError());
}
} else {
if (File_Delete(pathDest)) {
if (File_Delete(pathDest) == 0) {
Print("Error Deleting File: %s, %s\n", pathDest, GetError());
}
}