Message2721

Author pekka.klarck
Recipients
Date 2007-05-14.22:37:35
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Unfortunately there isn't any direct way to ask is the system case insensitive from the JVM. This patch is implemented so that at the end of the javapath.py there's 

_CASE_INSENSITIVE = samefile('foo', 'FOO')

and normcase itself has the following code.

def normcase(path):
    if _CASE_INSENSITIVE:
        path = path.lower()
    return path


If having a new module global attribute doesn't sound like a good idea normcase can of course be implemented as follows.

def normcase(path):
    if samefile('foo', 'FOO'):
        path = path.lower()
    return path


If extra samefile call everyting normcase is used is considered waste there's at least one more possible way.

if samefile('foo', 'FOO'):
    def normcase(path):
        return path.lower()
else:
    def normcase(path):
        return path
History
Date User Action Args
2008-02-20 17:18:43adminlinkissue1718975 messages
2008-02-20 17:18:43admincreate