[Kernel/Xam] Fixed non-empty directories removal

This commit is contained in:
Gliniak 2020-05-20 21:45:29 +02:00 committed by illusion
parent 2c3e1def64
commit 6353577c6d
1 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ X_RESULT FolderContentPackage::Delete() {
Unmount();
if (std::filesystem::exists(package_path_)) {
std::filesystem::remove(package_path_);
std::filesystem::remove_all(package_path_);
return X_ERROR_SUCCESS;
}
return X_ERROR_FILE_NOT_FOUND;
@ -190,7 +190,7 @@ X_RESULT StfsContentPackage::Delete() {
Unmount();
if (std::filesystem::exists(package_path_)) {
return std::filesystem::remove(package_path_) ? X_ERROR_SUCCESS
return std::filesystem::remove_all(package_path_) ? X_ERROR_SUCCESS
: X_ERROR_FUNCTION_FAILED;
}
return X_ERROR_FILE_NOT_FOUND;