From c5a0ded129ac92cbdc2a60cf0aaea054b0a6e2b5 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 6 May 2003 05:08:57 +0000 Subject: [PATCH] Reverse sorting of MediaFileMap keys svn: r1499 --- src/ReadXML.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ReadXML.py b/src/ReadXML.py index 1a775106a..21e002988 100644 --- a/src/ReadXML.py +++ b/src/ReadXML.py @@ -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()