]> Git trees. - libqmvoc.git/commitdiff
dont sort fils with more than 1 identifier(language)
authorJeremy Paul Whiting <jpwhiting@kde.org>
Fri, 21 Sep 2007 22:07:19 +0000 (22:07 +0000)
committerJeremy Paul Whiting <jpwhiting@kde.org>
Fri, 21 Sep 2007 22:07:19 +0000 (22:07 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=715350

keduvocdocument/sharedkvtmlfiles.cpp

index 702cab4f0e428cb3f65700873f2d61eb7ddf40bc..8ff877476061ca1e1707c4b569a417e042d08daa 100644 (file)
@@ -166,16 +166,18 @@ void SharedKvtmlFiles::sortDownloadedFiles()
         // open the file
         doc.open( fileUrl );
 
-        QString locale = doc.identifier( 0 ).name();
+        if (doc.identifierCount() == 1) {
+            QString locale = doc.identifier( 0 ).name();
 
-        // make sure the locale sub-folder exists
-        KUrl pathUrl( fileUrl );
-        pathUrl.setFileName( QString() );
-        pathUrl.addPath( locale );
-        KIO::mkdir( pathUrl );
+            // make sure the locale sub-folder exists
+            KUrl pathUrl( fileUrl );
+            pathUrl.setFileName( QString() );
+            pathUrl.addPath( locale );
+            KIO::mkdir( pathUrl );
 
-        // move the file into the locale sub-folder
-        KIO::move( fileUrl, pathUrl );
+            // move the file into the locale sub-folder
+            KIO::move( fileUrl, pathUrl );
+        }
 
         // take off the one we just did
         unsortedFiles.removeFirst();