mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-14 21:41:25 -07:00
begin work on lister-flavored watch windows; begin on using that for the query ui
This commit is contained in:
@@ -547,6 +547,27 @@ os_properties_from_file_path(String8 path)
|
||||
os_w32_dense_time_from_file_time(&props.modified, &find_data.ftLastWriteTime);
|
||||
props.flags = os_w32_file_property_flags_from_dwFileAttributes(find_data.dwFileAttributes);
|
||||
}
|
||||
else
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
WCHAR buffer[512] = {0};
|
||||
DWORD length = GetLogicalDriveStringsW(sizeof(buffer), buffer);
|
||||
U64 last_slash_pos = str8_find_needle(path, 0, str8_lit("/"), StringMatchFlag_SlashInsensitive);
|
||||
String8 path_trimmed = str8_prefix(path, last_slash_pos);
|
||||
for(U64 off = 0; off < (U64)length;)
|
||||
{
|
||||
String16 next_drive_string_16 = str16_cstring((U16 *)buffer+off);
|
||||
off += next_drive_string_16.size+1;
|
||||
String8 next_drive_string = str8_from_16(scratch.arena, next_drive_string_16);
|
||||
next_drive_string = str8_chop_last_slash(next_drive_string);
|
||||
if(str8_match(path_trimmed, next_drive_string, StringMatchFlag_CaseInsensitive))
|
||||
{
|
||||
props.flags |= FilePropertyFlag_IsFolder;
|
||||
break;
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
FindClose(handle);
|
||||
scratch_end(scratch);
|
||||
return props;
|
||||
|
||||
Reference in New Issue
Block a user