Better error reporting

This commit is contained in:
2016-09-17 09:21:34 +02:00
parent 8c50fdc8ba
commit 6c67153607
5 changed files with 65 additions and 16 deletions

View File

@@ -250,19 +250,23 @@ void AccionFileNodeAux_Copy(char *pathOrig, char *pathDest) {
AccionFileNodeAux_CopyDate(pathOrig, pathDest);
} else {
File_Delete(pathDest);
Print("Error Copying to: %s\n", pathDest);
Print("Error Copying to: %s, %s\n", pathDest, GetError());
}
}
void AccionFileNodeAux_Delete(char *pathOrig, char *pathDest) {
if (File_IsDirectory(pathDest)) {
File_DeleteDirectory(pathDest);
if (File_DeleteDirectory(pathDest)) {
Print("Error Deleting Directory: %s, %s\n", pathDest, GetError());
}
} else {
File_Delete(pathDest);
if (File_Delete(pathDest)) {
Print("Error Deleting File: %s, %s\n", pathDest, GetError());
}
}
}
void AccionFileNodeAux_MakeDir(char *pathOrig, char *pathDest) {
if (File_MakeDirectory(pathDest) == 0) {
Print("Error Making Directory: %s\n", pathDest);
Print("Error Making Directory: %s, %s\n", pathDest, GetError());
}
}