[Issue 8967] dirEntries throws when encountering a "long path" on windows
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 18 09:50:37 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=8967
--- Comment #8 from Jay Norwood <jayn at prismnet.com> 2014-03-18 09:50:23 PDT ---
2. Because you cannot use the "\\?\" prefix with a relative path, relative
paths are always limited to a total of MAX_PATH characters.
So, yes, relative paths don't work when you use that prefix (I tried). But
this below did work for me, where e is a DirEntry.
nm = r"\\?\" ~ absolutePath(e.name);
There is also the issue of read-only status needing to be cleared if files or
directories are to be removed. Our remove() and rmdir() don't take care of
this for you, so if you are removing items with long paths the above expansion
needs to be done before these getAttributes and setAttributes calls can
succeed.
uint att = getAttributes(fn);
att ^= FILE_ATTRIBUTE_READONLY;
setAttributes(fn, att);
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list