[
https://issues.apache.org/jira/browse/XERCESC-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Boris Kolpackov updated XERCESC-1877:
-------------------------------------
Priority: Minor (was: Major)
Issue Type: Improvement (was: Bug)
Cygwin is a POSIX compatibility layer for Windows. Applications that target
Cygwin are expected to use POSIX paths, not Windows paths. There are some
applications that support both but that is rather the exception than the rule.
I am therefore changing this issue's severity from Bug to Improvement.
If someone wants to add support (and to continue to maintain the added code)
for both types of paths on Cygwin, then I believe it should be done by creating
another implementation of the file manager interface instead of adding
Cygwin-specific code to PosixFileMgr.
> Windows paths are not handled properly under cygwin
> ---------------------------------------------------
>
> Key: XERCESC-1877
> URL: https://issues.apache.org/jira/browse/XERCESC-1877
> Project: Xerces-C++
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 3.0.1
> Environment: Cygwin with Xerces 3.0.1 built with ./configure and then
> make
> Reporter: Mathieu Champlon
> Priority: Minor
>
> The Cygwin version of Xerces appears to be using the PosixFileMgr and
> therefore isRelative returns false for a path starting with c: whereas it is
> totally valid.
> To reproduce the issue copy samples/data/personal.xml (and personal.dtd) into
> c:\tmp and run DOMCount as follows.
> $ pwd
> /cygdrive/c/Users/Mat/Desktop/dev/cpp/xerces-c-3.0.1/samples
> $ ls c:/tmp
> personal.dtd personal.xml
> $ ./DOMCount.exe c:/tmp/personal.xml
> Fatal Error at file , line 0, char 0
> Message: unable to open primary document entity
> '/cygdrive/c/Users/Mat/Desktop
> /dev/cpp/xerces-c-3.0.1/samples/c:/tmp/personal.xml'
> Errors occurred, no output available
> ***
> Then I added the following lines taken from WindowsFileMgr to
> PosixFileMgr::isRelative :
> #ifdef __CYGWIN__
> if (toCheck[1] == chColon)
> {
> if (((toCheck[0] >= chLatin_A) && (toCheck[0] <= chLatin_Z))
> || ((toCheck[0] >= chLatin_a) && (toCheck[0] <= chLatin_z)))
> {
> return false;
> }
> }
> #endif
> With the following line at the top of PoxisFileMgr.cpp :
> #include <xercesc/util/XMLUniDefs.hpp>
> I recompiled the samples and ran DOMCount once again :
> $ ./DOMCount.exe c:/tmp/personal.xml
> c:/tmp/personal.xml: 67 ms (37 elems).
> The #ifdef __CYGWIN__ is probably not the way to go but it shows exactly
> where the problem is.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]