This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ocean-city
Recipients JDay, amaury.forgeotdarc, ocean-city
Date 2008-10-09.18:37:36
SpamBayes Score 1.110223e-15
Marked as misclassified No
Message-id <1223577459.46.0.813505611264.issue4071@psf.upfronthosting.co.za>
In-reply-to
Content
I think attached patch "fix_getfullpathname.patch" will fix unicode
issue at least. For ansi issue, I followed the manner of win32_chdir for
now.

After some investigation, GetFullPathNameA fails if output size is more
than MAX_PATH even if input size is less than MAX_PATH. I feel it's
difficult check this before invoking GetFullPathNameA.

This is test for unicode issue.

/////////////////////////////////////////////////////////

import unittest
import ntpath
import os

class TestCase(unittest.TestCase):
    def test_getfullpathname(self):
        for count in xrange(1, 1000):
            name = u"x" * count
            path = ntpath._getfullpathname(name)
            self.assertEqual(os.path.basename(path), name)

if __name__ == '__main__':
    unittest.main()
History
Date User Action Args
2008-10-09 18:37:39ocean-citysetrecipients: + ocean-city, amaury.forgeotdarc, JDay
2008-10-09 18:37:39ocean-citysetmessageid: <1223577459.46.0.813505611264.issue4071@psf.upfronthosting.co.za>
2008-10-09 18:37:38ocean-citylinkissue4071 messages
2008-10-09 18:37:37ocean-citycreate