OpenHashTab icon indicating copy to clipboard operation
OpenHashTab copied to clipboard

Display shorter Name value for relative paths `..\`

Open redactedscribe opened this issue 1 year ago • 2 comments

Some sumfiles are distributed with relative paths, and when this is the case, the Name value in OHT will be \\?\C:\...\...\Filename.ext for example. When file paths are relative but in a subfolder, OHT displays Subfolder\Filename.ext and so for relative paths that are outside of the parent it would be nice to see ..\Filename.txt instead of a long path. This would keep both relative Name values more comparable in character length and need less expansion of the Name column to see all listed values.

Thanks.

OHT v3.0.2

redactedscribe avatar Jul 05 '22 16:07 redactedscribe

This was considered but dropped over security and time complexity concerns. It looks simple, but when you add symlinks, junctions, shortpaths, NT paths, etc.. It becomes quite a bit more complicated. "the directory above" is a simple concept, that's why that is supported. I'll think about this a bit more, but will probably be a wontfix.

namazso avatar Jul 05 '22 16:07 namazso

I guess finding the canonical paths to both files and finding the deepest common ancestor should be at least as secure as the current way and doesn't have a problematic time complexity.

namazso avatar Jul 05 '22 16:07 namazso