Fix ResourceLoader::exists() false negative and readd deprecated has()

This commit is contained in:
Rémi Verschelde
2018-08-12 12:44:38 +02:00
parent 64595f0f6a
commit d29ea4337f
3 changed files with 15 additions and 1 deletions

View File

@ -126,6 +126,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const Stri
bool ResourceFormatLoader::exists(const String &p_path) const {
return FileAccess::exists(p_path); //by default just check file
}
RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
String path = p_path;
@ -252,7 +253,7 @@ bool ResourceLoader::exists(const String &p_path, const String &p_type_hint) {
if (ResourceCache::has(local_path)) {
return false; //if cached, it probably exists i guess
return true; // If cached, it probably exists
}
bool xl_remapped = false;