std.utf.toUTF16z and windows unicode path limits
Jay Norwood
jayn at prismnet.com
Tue Mar 18 10:05:32 PDT 2014
On Tuesday, 18 March 2014 at 02:02:04 UTC, Vladimir Panteleev
wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=8967
ok, thanks. I was able to work around my issues
The basic solution, as you indicated, is to prefix any long
paths. Also the prefix is only usable on an absolute path.
nm = r"\\?\" ~ absolutePath(e.name);
One more issue I ran into was that our remove() and rmdir() don't
override the read-only attribute for you. You have to check and
clear this. If you are doing these getAttributes and
setAttributes calls on long paths, you'll run into the same
issues and need the above expansion.
uint att = getAttributes(fn);
att ^= FILE_ATTRIBUTE_READONLY;
setAttributes(fn, att);
So, I think the issue has enough notes in it to create a fix, and
it would be a general solution that would make all of the windows
unicode path calls support the 32K unicode path limit.
An option to handle the read-only attribute would be nice also...
More information about the Digitalmars-d
mailing list