Browse Source

should use vfs to verify file existence

David Rose 21 years ago
parent
commit
a24337f7b0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      panda/src/framework/windowFramework.cxx

+ 3 - 1
panda/src/framework/windowFramework.cxx

@@ -49,6 +49,7 @@
 #include "loaderFileTypeRegistry.h"
 #include "pnmFileTypeRegistry.h"
 #include "pnmImage.h"
+#include "virtualFileSystem.h"
 
 // This is generated data for the standard texture we apply to the
 // blue triangle.
@@ -552,7 +553,8 @@ load_model(const NodePath &parent, Filename filename) {
 
   // If the filename already exists where it is, or if it is fully
   // qualified, don't search along the model path for it.
-  bool search = !(filename.is_fully_qualified() || filename.exists());
+  VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr();
+  bool search = !(filename.is_fully_qualified() || vfs->exists(filename));
 
   // We allow loading image files here.  Check to see if it might be
   // an image file, based on the filename extension.