Fix error checking on file and directory deletion.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user