diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-12 11:15:02 +0300 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-12 14:50:14 +0300 |
| commit | d2ebac3a302f41223ab86f5bc2862dd3a050a010 (patch) | |
| tree | a360d9c508dacd4d00ce9ca9525a1b8c83a5bdd7 /drivers/windows/file_access_windows.cpp | |
| parent | 788f355ad2f8c1826f5e55477249934d45d62891 (diff) | |
| download | redot-engine-d2ebac3a302f41223ab86f5bc2862dd3a050a010.tar.gz | |
Remove or make private `FileAccess` `close()` methods.
Diffstat (limited to 'drivers/windows/file_access_windows.cpp')
| -rw-r--r-- | drivers/windows/file_access_windows.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 59dc1d8e77..1a66d19373 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -59,11 +59,10 @@ void FileAccessWindows::check_errors() const { } Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) { + _close(); + path_src = p_path; path = fix_path(p_path); - if (f) { - close(); - } const WCHAR *mode_string; @@ -134,7 +133,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) { } } -void FileAccessWindows::close() { +void FileAccessWindows::_close() { if (!f) { return; } @@ -350,7 +349,7 @@ Error FileAccessWindows::_set_unix_permissions(const String &p_file, uint32_t p_ } FileAccessWindows::~FileAccessWindows() { - close(); + _close(); } #endif // WINDOWS_ENABLED |
