Forráskód Böngészése

Use appropriate functions instead of directly checking structures..."

Daniele Bartolini 12 éve
szülő
commit
8b4ea10eb3
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/core/filesystem/Filesystem.cpp

+ 2 - 2
src/core/filesystem/Filesystem.cpp

@@ -190,8 +190,8 @@ DiskFile* Filesystem::open(const char* relative_path, FileOpenMode mode)
 {
 	FilesystemEntry info;
 
-	CE_ASSERT(get_info(relative_path, info), "File does not exist: %s", relative_path);
-	CE_ASSERT(info.type == FilesystemEntry::FILE, "File is not a regular file: %s", relative_path);
+	CE_ASSERT(exists(relative_path), "File does not exist: %s", relative_path);
+	CE_ASSERT(is_file(relative_path), "File is not a regular file: %s", relative_path);
 
 	return CE_NEW(m_allocator, DiskFile)(mode, info.os_path);
 }