Pretty sure we don't actually need this, but submitting just in case I am wrong...
Currently we have BLI_filelist_entry_owner_to_string() that returns the name of the owner of a file system object. It works for Mac and Linux (I am assuming) but is currently hard-coded to always return "unknown" on Windows. This patch adds support for getting proper local and domain ownership on Windows.
This patch only just adds the code changes needed to support Windows. An easy way to test this after applying this patch: Locate file_draw_tooltip_func() in source\blender\editors\space_file\file_draw.c and change it so that it looks like this:
static char *file_draw_tooltip_func(bContext *UNUSED(C), void *argN, const char *UNUSED(tip))
{
char *path = argN;
BLI_stat_t stats;
if (BLI_stat(path, &stats) == -1)
{
return BLI_strdup(path);
}
char owner[FILELIST_DIRENTRY_OWNER_LEN];
BLI_filelist_entry_owner_to_string(path, stats.st_uid, false, &owner);
return BLI_strdup(owner);
}Afterward just browse around with the File Manager, set to show details (not thumbnails). Hover over any icon in the left column and it will show the file owner like this:
Note that the terminal period shown above is just something added to all tooltips and is not part of the ownership string returned.
