Reverse sorting of MediaFileMap keys

svn: r1499
This commit is contained in:
Alex Roitman 2003-05-06 05:08:57 +00:00
parent 2ed5ca6390
commit 64f34ccfec

View File

@ -115,7 +115,10 @@ def importData(database, filename, callback):
# Rename media files if they were conflicting with existing ones
ObjectMap = parser.db.getObjectMap()
for OldMediaID in parser.MediaFileMap.keys():
MediaFileMapKeys = parser.MediaFileMap.keys()
MediaFileMapKeys.sort()
MediaFileMapKeys.reverse()
for OldMediaID in MediaFileMapKeys:
NewMediaID = parser.MediaFileMap[OldMediaID]
if NewMediaID != OldMediaID:
oldfile = ObjectMap[NewMediaID].getPath()