GNOME Bugzilla – Bug 464432
xsltproc -o "C:\absolute\path\to\file" does not work
Last modified: 2007-08-23 13:26:12 UTC
Please describe the problem: xsltproc -o "C:\absolute\path\to\file" does not work Steps to reproduce: use xsltproc with path with drive letter in -o path Actual results: Expected results: Does this happen every time? yes Other information: I have fixed the bug and will attach a patch.
Created attachment 93229 [details] [review] fix a problem on windows when drive letters are used in paths to -o
Created attachment 93230 [details] [review] fix win32 configure and make scripts
First patch looks okay, some parts of the second looks normal i.e. missing objects, but I can't juge the full set. Rob, hopefully you have an opinion about it ! Daniel
Is this patch reliant on any of those other diffs (from 2004) you had pointed to in regards to the getParserDirectory issue? I only had a quick chance to run it on my windows machine (which i wont be in front of for another day), but was seeing a problem when it was trying to stat the drive letter, which ended up causing everything to fail to create the dirs.
The patch is more general I think, because the older just set the sep to '/'. About the drive letter: good point. Perhaps it is better not to allow to go below e.g. C:\. But this should be easy enough to take care of. Considering....
Created attachment 93294 [details] [review] Don't go below drive letter on windows. This patch now will test for ':' in the 2'nd position and report this as root directory, not going below. Anyhow, the semantics of the overall function is somewhat questionable to me since it is not evident if one is allowed to pass '.', '..' also. Passing '..' will result in questionable directory anyways. Roland aka speedsnail
Created attachment 93634 [details] [review] Windows directory determination The windows path portion required an older patch, so in order to solve this issue, a different approach was needed. Try the attached patch which uses GetFileAttributes() because unlike stat it doesn't crap out when a trailing slash is not present with the drive letter. If for some reason this call fails, it falls back to the stat call. This should work with Win95 and above.
The patch worked for me. Can the bug be closed, and patches fix win32 configure and make scripts Windows directory determination be applied? Roland aka speedsnail
(In reply to comment #7) > ... If for some reason this call fails, > it falls back to the stat call. This should work with Win95 and above. Is there a reason not to apply this patch and close the bug? Roland aka speedsnail
Okay, patch looks good to me (i.e. fully Windows contained), applied and commited to SVN, thanks a lot, Daniel