Skip to content

Commit

Permalink
Fix invalid file path handling in Windows when there is dot in the fi…
Browse files Browse the repository at this point in the history
…le name

This basically re-adds dot-removal removed by the previous commit.
  • Loading branch information
GNSS-Stylist authored and akien-mga committed Feb 13, 2024
1 parent 9272f7b commit c5e1b32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/windows/file_access_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ void FileAccessWindows::check_errors() const {

bool FileAccessWindows::is_path_invalid(const String &p_path) {
// Check for invalid operating system file.
String fname = p_path.get_file().get_basename().to_lower();
String fname = p_path.get_file().to_lower();

int dot = fname.find(".");
if (dot != -1) {
fname = fname.substr(0, dot);
}
return invalid_files.has(fname);
}

Expand Down

0 comments on commit c5e1b32

Please sign in to comment.