summaryrefslogtreecommitdiffstats
path: root/drivers/windows/file_access_windows.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-09 12:37:03 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-09 12:37:03 +0100
commit94dbf69f5d6b7d2fd9561692df2e71557607fddc (patch)
tree470b46afe643784944085aa949b6dba2fc4b1442 /drivers/windows/file_access_windows.cpp
parentd3512994556eb60cf97356b10bd276590824ea31 (diff)
parentbe8f60a78d36542a5da497d3b99f59ca78b093a9 (diff)
downloadredot-engine-94dbf69f5d6b7d2fd9561692df2e71557607fddc.tar.gz
Merge pull request #88129 from bruvzg/_con_
[Windows] Fix windows `is_path_invalid`, and apply it to directory creation.
Diffstat (limited to 'drivers/windows/file_access_windows.cpp')
-rw-r--r--drivers/windows/file_access_windows.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index 1b69f5da2c..163ac4152c 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -60,12 +60,7 @@ void FileAccessWindows::check_errors() const {
bool FileAccessWindows::is_path_invalid(const String &p_path) {
// Check for invalid operating system file.
- String fname = p_path;
- int dot = fname.find(".");
- if (dot != -1) {
- fname = fname.substr(0, dot);
- }
- fname = fname.to_lower();
+ String fname = p_path.get_file().get_basename().to_lower();
return invalid_files.has(fname);
}