After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 464432 - xsltproc -o "C:\absolute\path\to\file" does not work
xsltproc -o "C:\absolute\path\to\file" does not work
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-07 17:24 UTC by Roland Schwarz
Modified: 2007-08-23 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix a problem on windows when drive letters are used in paths to -o (766 bytes, patch)
2007-08-07 17:25 UTC, Roland Schwarz
none Details | Review
fix win32 configure and make scripts (4.38 KB, patch)
2007-08-07 17:26 UTC, Roland Schwarz
none Details | Review
Don't go below drive letter on windows. (1.41 KB, patch)
2007-08-08 16:42 UTC, Roland Schwarz
none Details | Review
Windows directory determination (1.22 KB, patch)
2007-08-14 09:55 UTC, Rob Richards
none Details | Review

Description Roland Schwarz 2007-08-07 17:24:19 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.
Comment 1 Roland Schwarz 2007-08-07 17:25:20 UTC
Created attachment 93229 [details] [review]
fix a problem on windows when drive letters are used in paths to -o
Comment 2 Roland Schwarz 2007-08-07 17:26:49 UTC
Created attachment 93230 [details] [review]
fix win32 configure and make scripts
Comment 3 Daniel Veillard 2007-08-07 20:42:28 UTC
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
Comment 4 Rob Richards 2007-08-08 15:20:10 UTC
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.
Comment 5 Roland Schwarz 2007-08-08 15:35:25 UTC
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....
Comment 6 Roland Schwarz 2007-08-08 16:42:48 UTC
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
Comment 7 Rob Richards 2007-08-14 09:55:31 UTC
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.
Comment 8 Roland Schwarz 2007-08-17 08:58:03 UTC
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
Comment 9 Roland Schwarz 2007-08-20 15:14:31 UTC
(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


Comment 10 Daniel Veillard 2007-08-23 13:26:12 UTC
Okay, patch looks good to me (i.e. fully Windows contained), 
applied and commited to SVN,

 thanks a lot,

Daniel