Re: [xml] [PATCH] support long path names on WNT
- From: LRN <lrn1986 gmail com>
- To: xml gnome org
- Subject: Re: [xml] [PATCH] support long path names on WNT
- Date: Wed, 22 Aug 2012 23:33:55 +0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 22.08.2012 21:14, Michael Stahl wrote:
hi all,
so we've got this patch to libxml2 2.7.6 in the LibreOffice code
base, inherited from OOo. it fixes a definite problem, which is
that Windows has a rather low maximum path length restriction, and
there is a special trick on NT whereby path names can be prefixed
with "\\?\", in which case the maximum length is 32k, which ought
to be sufficient even for bloated office suites :)
i'll attach the patch to the xmlCanonicPath function. note that i
didn't write this and am by no means an expert on either
Microsoftean platforms or libxml so maybe it's not the best way to
do it. well, the strlen call in there looks superfluous to me.
1) A stat() implementation that works with long paths (by wrapping W32
API calls that work with long paths) is definitely needed.
Stat-related part of the patch you've sent looks like a hack to me
(though it might work for the particular issue you have, and it
certainly won't make things worse). Maybe not just stat(), but other
functions. That's something that should be moved to an utility
library, or to one of the mingw projects (mingw.org or mingw-w64).
2) xmlCanonicPath() part of the patch is not something i can comment
upon; however, the comment in the code claims that canonicization is
intended to make the path URIable. \\?\ paths certainly are not usable
in URIs, AFAIU (CMIIAW), so this might have unpleasant consequences in
some codepaths. I'll leave that up to libxml experts to verify.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJQNTQjAAoJEOs4Jb6SI2Cw410IAN6YtZOsVP+R9ql/cb0ituLZ
285JV7wcvFjnjj4p/YtWn0ynLHPYlPCDCK/RiJDM6YHAEtvCeZfnVZ3KwMkg0TWk
yEfHynfN1ispPox+UpVwFWSyGLuYjRPPeXqfptUr9EjTiq+sYnkobYdP398nlCYv
gQxvSCwdmnJZzg8KOAUY+UGdcNe3kBXkvsPyGWGBJzTC9+TCh04uoUGAJEHPrjqa
YDkn74HBUvCzNAyGoAy8v6EtDK/XfxIaEOUthpgzHdGs85QtCrAZOZbrzexLj+HB
MBKABG5UbSyEbGzsGLugsFzQ4j7rvyt6az2UWUD4NZ/wxyjXJDSwUkFYxGgp6Ws=
=9AEs
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]