mirror of
https://github.com/redstrate/Physis.git
synced 2025-07-20 07:47:45 +00:00
Always read path as lowercase in UnpackedResource
This commit is contained in:
parent
2858c8a37b
commit
c0d3df99c3
1 changed files with 2 additions and 2 deletions
|
@ -20,14 +20,14 @@ impl UnpackedResource {
|
||||||
impl Resource for UnpackedResource {
|
impl Resource for UnpackedResource {
|
||||||
fn read(&mut self, path: &str) -> Option<ByteBuffer> {
|
fn read(&mut self, path: &str) -> Option<ByteBuffer> {
|
||||||
let mut new_path = PathBuf::from(&self.base_directory);
|
let mut new_path = PathBuf::from(&self.base_directory);
|
||||||
new_path.push(path);
|
new_path.push(path.to_lowercase());
|
||||||
|
|
||||||
std::fs::read(new_path).ok()
|
std::fs::read(new_path).ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn exists(&mut self, path: &str) -> bool {
|
fn exists(&mut self, path: &str) -> bool {
|
||||||
let mut new_path = PathBuf::from(&self.base_directory);
|
let mut new_path = PathBuf::from(&self.base_directory);
|
||||||
new_path.push(path);
|
new_path.push(path.to_lowercase());
|
||||||
|
|
||||||
std::fs::exists(new_path).unwrap_or_default()
|
std::fs::exists(new_path).unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue