Ticket #244 (defect)

Opened 2 years ago

Last modified 2 years ago

os.listdir()

Status: closed (fixed)

Reported by: anonymous Assigned to: fraca7
Priority: minor Component: PythonCore
Version: Keywords:
Cc:

I don't know if this is a bug, but it surely is weird :)

imagine you have a file 'a.png'

on the pc os.listdir() works ok on that file, but on the psp it returns 'A.PNG'

'aa.png' returns 'AA.PNG'

until

'aaaaaaaa.png' returns 'AAAAAAAA.PNG'

and for files longer than those, it works ok

this bug, kept me a couple of hours trying to find out why my code wasn't working. i was getting '001.PNG' from os.listdir(), and when trying to load the file, it didn't exist, because the name was '001.png' lol

Change History

09/26/06 16:01:33: Modified by fraca7

  • status changed from new to assigned.
  • type set to defect.
  • component changed from documentation to PythonCore.

Yep, the way the PSP handles character case is rather strange. I don't know what to do here, should I convert all file names to lowercase ?

10/02/06 11:17:20: Modified by fraca7

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed. File names are now normalized to lowercase.