diff --git a/direct/src/dcparser/dcFile.cxx b/direct/src/dcparser/dcFile.cxx index 5c0916e45f..144e36e6f2 100644 --- a/direct/src/dcparser/dcFile.cxx +++ b/direct/src/dcparser/dcFile.cxx @@ -140,7 +140,7 @@ read(Filename filename) { #ifdef WITHIN_PANDA filename.set_text(); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - istream *in = vfs->open_read_file(filename); + istream *in = vfs->open_read_file(filename, true); if (in == (istream *)NULL) { cerr << "Cannot open " << filename << " for reading.\n"; return false; diff --git a/panda/src/audiotraits/fmodAudioManager.cxx b/panda/src/audiotraits/fmodAudioManager.cxx index 694c0c1db2..d78c453614 100644 --- a/panda/src/audiotraits/fmodAudioManager.cxx +++ b/panda/src/audiotraits/fmodAudioManager.cxx @@ -203,15 +203,9 @@ get_sound(const string &file_name, bool positional) { for (type_i = _supported_types.begin(); type_i != _supported_types.end(); ++type_i) { path.set_extension(*type_i); // set extension as supported type - if (use_vfs) { // check virtual file system - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - if (vfs->resolve_filename(path, get_sound_path())) { - break; // break out of loop with a valid type_i value and path with correct extension - } - } else { // check regular file system - if (path.resolve_filename(get_sound_path())) { - break; // break out of loop with a valid type_i value and path with correct extension - } + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + if (vfs->resolve_filename(path, get_sound_path())) { + break; // break out of loop with a valid type_i value and path with correct extension } } // end for loop // if no valid file found @@ -344,12 +338,8 @@ uncache_sound(const string& file_name) { nassertv(is_valid()); Filename path = file_name; - if (use_vfs) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - vfs->resolve_filename(path, get_sound_path()); - } else { - path.resolve_filename(get_sound_path()); - } + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + vfs->resolve_filename(path, get_sound_path()); audio_debug(" path=\""<read_file(_client_certificate_filename, - _client_certificate_pem)) { + _client_certificate_pem, true)) { // Could not find or read file. downloader_cat.warning() << "Could not read " << _client_certificate_filename << ".\n"; @@ -914,16 +914,7 @@ parse_http_version_string(const string &version) { //////////////////////////////////////////////////////////////////// bool HTTPClient:: load_certificates(const Filename &filename) { - int result; - - if (use_vfs) { - result = load_verify_locations(_ssl_ctx, filename); - - } else { - string os_specific = filename.to_os_specific(); - result = - SSL_CTX_load_verify_locations(_ssl_ctx, os_specific.c_str(), NULL); - } + int result = load_verify_locations(_ssl_ctx, filename); if (result <= 0) { downloader_cat.info() @@ -1398,7 +1389,7 @@ load_verify_locations(SSL_CTX *ctx, const Filename &ca_file) { // First, read the complete file into memory. string data; - if (!vfs->read_file(ca_file, data)) { + if (!vfs->read_file(ca_file, data, true)) { // Could not find or read file. downloader_cat.info() << "Could not read " << ca_file << ".\n"; diff --git a/panda/src/express/hashVal.cxx b/panda/src/express/hashVal.cxx index 8d5bbcf869..2a316a9190 100644 --- a/panda/src/express/hashVal.cxx +++ b/panda/src/express/hashVal.cxx @@ -205,7 +205,7 @@ bool HashVal:: hash_file(const Filename &filename) { Filename bin_filename = Filename::binary_filename(filename); VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - istream *istr = vfs->open_read_file(bin_filename); + istream *istr = vfs->open_read_file(bin_filename, false); if (istr == (istream *)NULL) { (*this) = HashVal(); return false; diff --git a/panda/src/pgraph/shader.cxx b/panda/src/pgraph/shader.cxx index 6a9c7b13d1..57d9fa622f 100644 --- a/panda/src/pgraph/shader.cxx +++ b/panda/src/pgraph/shader.cxx @@ -77,7 +77,7 @@ load(const Filename &file, int preprocessor) { result->_preprocessor = preprocessor; result->_fixed_expansion = 0; VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - if (!vfs->read_file(file, result->_body)) { + if (!vfs->read_file(file, result->_body, true)) { cerr << "Could not read shader file: " << file << "\n"; result->_body = ""; } diff --git a/panda/src/putil/load_prc_file.cxx b/panda/src/putil/load_prc_file.cxx index 86d528485e..5601e85bc4 100644 --- a/panda/src/putil/load_prc_file.cxx +++ b/panda/src/putil/load_prc_file.cxx @@ -53,7 +53,7 @@ load_prc_file(const string &filename) { vfs->resolve_filename(path, cp_mgr->get_search_path()) || vfs->resolve_filename(path, get_model_path()); - istream *file = vfs->open_read_file(path); + istream *file = vfs->open_read_file(path, true); if (file == (istream *)NULL) { util_cat.error() << "Unable to open " << path << "\n"; diff --git a/panda/src/text/fontPool.cxx b/panda/src/text/fontPool.cxx index 4af6735667..d6ada8eeeb 100644 --- a/panda/src/text/fontPool.cxx +++ b/panda/src/text/fontPool.cxx @@ -233,13 +233,8 @@ lookup_filename(const string &str, string &index_str, } // Now look up the filename on the model path. - if (use_vfs) { - VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); - vfs->resolve_filename(filename, get_model_path()); - - } else { - filename.resolve_filename(get_model_path()); - } + VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); + vfs->resolve_filename(filename, get_model_path()); ostringstream strm; strm << filename << ":" << face_index;