This commit is contained in:
Spartan322
2025-08-13 19:56:49 -04:00
419 changed files with 812199 additions and 295836 deletions

View File

@@ -331,7 +331,14 @@ Error DirAccessWindows::remove(String p_path) {
uint64_t DirAccessWindows::get_space_left() {
uint64_t bytes = 0;
if (!GetDiskFreeSpaceEx(nullptr, (PULARGE_INTEGER)&bytes, nullptr, nullptr)) {
String path = fix_path(current_dir);
if (!path.ends_with("\\")) {
path += "\\";
}
if (!GetDiskFreeSpaceExW((LPCWSTR)(path.utf16().get_data()), (PULARGE_INTEGER)&bytes, nullptr, nullptr)) {
return 0;
}