Explorar o código

filesystem: Remove unnecessary if conditions

Zach Hilman %!s(int64=8) %!d(string=hai) anos
pai
achega
b36dee364e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/hle/service/filesystem/filesystem.cpp

+ 1 - 1
src/core/hle/service/filesystem/filesystem.cpp

@@ -59,7 +59,7 @@ ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64
 ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) const {
     std::string path(FileUtil::SanitizePath(path_));
     auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path));
-    if (path == "/" || path == "\\") {
+    if (path.empty()) {
         // TODO(DarkLordZach): Why do games call this and what should it do? Works as is but...
         return RESULT_SUCCESS;
     }