Bug 122640 - Zip files created using Ark via the Konqueror context menu have a capital ZIP extension
Summary: Zip files created using Ark via the Konqueror context menu have a capital ZIP...
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-24 14:26 UTC by Shriramana Sharma
Modified: 2006-03-09 01:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shriramana Sharma 2006-02-24 14:26:21 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
OS:                Linux

Extensions are always used as small letters in Linux. Therefore the Konqueror Ark context menu correctly shows in its "Compress As" menu a suggested archive file name with the extension .zip with small letters.

But if I click on that item to create a zip file, it is created with extension in capital letters - .ZIP -- so.

Though this is just a small bug, for consistency and neatness and conformance to expected behaviour, it should be corrected. This was observed in the Ark 2.61 that comes with KDE 3.51, but not in Ark 2.52 with KDE 3.4.
Comment 1 Haris Kouzinopoulos 2006-02-24 15:46:43 UTC
I can't reproduce this. I tried a couple of files, all are compressed as .zip normally. Is it happening to all files?
Comment 2 Shriramana Sharma 2006-02-24 17:31:36 UTC
I have tried executables, makefiles, c source files, png files, directories... all same. SUSE Linux 10.0, KDE 3.51, Ark 2.61.
Comment 3 Nicolas Goutte 2006-02-25 12:51:08 UTC
On what kind of file system are you trying to write those files?

It sounds as you would write on a VFAT (Windows) file system. (If the name fit into 8+3 name pattern, you could have this behaviour in that case.)

Have a nice day!
Comment 4 Shriramana Sharma 2006-02-25 18:49:47 UTC
reiserfs 3.6 as installed by SUSE Linux 10.0 -- does not any other SUSE user or Linux user see this bug?
Comment 5 Haris Kouzinopoulos 2006-02-25 18:58:19 UTC
Ok i get it too sometimes. I am investigating it
Comment 6 Mathias Homann 2006-02-25 19:29:58 UTC
I'm getting the same, kde 3.5.1 from suse supplementary, SuSE 9.2, filesystem is ext3.
Comment 7 Peter Vollebregt 2006-02-25 21:02:05 UTC
I see the same thing happening on Mandriva 2006 (community) with KDE 3.5.1 From SoS). Tested on a Reiser file system and indeed also on vfat (with mount option 'shortname=mixed').
Comment 8 Nicolas Goutte 2006-02-25 21:53:02 UTC
Thanks to all! My idea that it could be VFAT-specific is not confirmed.
Comment 9 Haris Kouzinopoulos 2006-03-08 13:26:00 UTC
SVN commit 516728 by charis:

KMimeType returns .zip .ZIP .rar and .RAR. We should select zip and rar as the extensions instead of the capitals counterparts
BUG: 122640




 M  +4 -0      arkplugin.cpp  


--- branches/KDE/3.5/kdeaddons/konq-plugins/arkplugin/arkplugin.cpp #516727:516728
@@ -401,6 +401,10 @@
          target = filelist.first() + m_extensionList[ pos ];
     else
     {
+        //KMimeType returns .zip .ZIP .rar and .RAR. Here we select zip and rar as the extensions
+        if ( ( m_extensionList[ pos ].contains ( ".ZIP" ) ) || ( m_extensionList[ pos ].contains( ".RAR" ) ) )
+             pos-=1;
+
         target = m_dir + i18n("Archive") + m_extensionList[ pos ];
         int i=1;
         while ( KIO::NetAccess::exists(target, true, 0 ) )
Comment 10 Haris Kouzinopoulos 2006-03-09 01:53:06 UTC
SVN commit 516867 by charis:

Better implementation. Don't be sure that KMimeType will always return the same                 results
BUG: 122640
CCMAIL: thiago@kde.org



 M  +7 -4      arkplugin.cpp  


--- branches/KDE/3.5/kdeaddons/konq-plugins/arkplugin/arkplugin.cpp #516866:516867
@@ -397,14 +397,17 @@
          ++it;
          filelist.append( item->url().url() );
     }
+    //if KMimeType returns .ZIP or .RAR. convert them to lowercase
+    if ( m_extensionList[ pos ].contains ( ".ZIP" ) )
+         m_extensionList[ pos ] = ".zip";
+
+    if ( m_extensionList[ pos ].contains ( ".RAR" ) )
+         m_extensionList[ pos ] = ".rar";
+
     if ( filelist.count() == 1)
          target = filelist.first() + m_extensionList[ pos ];
     else
     {
-        //KMimeType returns .zip .ZIP .rar and .RAR. Here we select zip and rar as \
                the extensions
-        if ( ( m_extensionList[ pos ].contains ( ".ZIP" ) ) || ( m_extensionList[ \
                pos ].contains( ".RAR" ) ) )
-             pos-=1;
-
         target = m_dir + i18n("Archive") + m_extensionList[ pos ];
         int i=1;
         while ( KIO::NetAccess::exists(target, true, 0 ) )