Bug 52980 - Default extension .ksp doesn't append to saved filename
Summary: Default extension .ksp doesn't append to saved filename
Status: RESOLVED INTENTIONAL
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kfile (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Clarence Dang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-14 11:44 UTC by Andrey Cherepanov
Modified: 2005-08-06 20:14 UTC (History)
0 users

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 Andrey Cherepanov 2003-01-14 11:44:25 UTC
Version:           1.2.1 (using KDE 3.0.0)
Installed from:    Red Hat Linux 7.2.92
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-109)
OS:          Linux (i686) release 2.4.7-10

When I save file with name without extension .ksp, KSpread doesn't append this extension to file name. It's very strange, because KWord do it and files without .ksp don't open in KSpread even choose from 'Any files' filters and exactly write filename without extension.
Comment 1 Philipp Müller 2003-01-25 20:49:51 UTC
I cannot reproduce this with KDE from cvs and KSpread 1.2.1 or cvs. 
 
I asume this is a local problem with your installation or package. 
Comment 2 Philipp Müller 2003-01-25 20:58:37 UTC
Either seems to be fixed with KDE 3.1 or is a package problem 
Comment 3 Andrey Cherepanov 2003-01-27 04:01:11 UTC
Sorry, it works fine at KOffice-1.2.1. Possible, this bug had place in old version and I  
don't check it. :) 
Comment 4 Andrey Cherepanov 2003-05-28 05:33:09 UTC
Ok, I reopen bug - If I name file with name who has at least one dot ('.'), default extension 
doesn't appent to filename. 
 
For example: 
name		real_filename 
first			first.ksp 
second.file		second.file 
Comment 5 Andrey Cherepanov 2003-05-28 05:35:24 UTC
Note: this bug is also in KWord. Possible, it is in all KOffice apps. :( 
Comment 6 Philipp Müller 2003-05-29 14:51:49 UTC
Moved to component koffice, as it affects all KOffice apps. 
 
Philipp 
Comment 7 Clarence Dang 2003-05-31 15:04:44 UTC
If you are using KDE 3.0 or 3.1, this is not a KOffice bug - it is a KOffice  
feature :)   
   
If you are using KDE 3.2 CVS, this is not a KOffice bug - it is a KFileDialog   
feature :)   
   
The idea is that if the user has specified an extension then they really want  
that extension - not something that KFileDialog or KoMainWindow wants to add.   
This is a fairly sensible behaviour, unless you use dots in your filenames.  
  
The problem is that if this behaviour was removed, what should happen in the  
following cases:  
  
1. "blah.rtf": should an extension be automatically appended so that you get 
"blah.rtf.rtf"? 
 
2. "blah.htm": same as above (should it be "blah.htm.html"?) or did the user 
really want "blah.html" or "blah.htm"? 
 
3. "blah.rtf" when you've selected "KWord Document" as the filter: "blah.rtf" 
or "blah.rtf.kwd" 
 
  
Comment 8 Datschge 2003-05-31 21:18:58 UTC
The best solution for this imo seem to be not to hiddenly append file extensions 
following some "obscure" (as in the user might never find out why it behaves the way it 
does, as this report shows) rules after the file name  has been written, but instead 
suggest a full file name to start with which then can be changed by the user again if he 
wishes. 
Comment 9 Nicolas Goutte 2004-05-08 15:11:44 UTC
This should be fixed when KOffice 1.3.x is used with KDE 3.2.x

Have a nice day!
Comment 10 Andrey Cherepanov 2004-05-11 07:41:24 UTC
No, for given filename with dot (e.g. "spread.file") extension ".ksp" doesn't append to filename. Expected "spread.file.ksp". Saved as "spread.file". This is KOffice-wide problem in file selector dialog.
KOffice 1.3.1 with KDE 3.2.1, both compiled from sources.
Comment 11 David Faure 2004-05-11 17:30:28 UTC
On Tuesday 11 May 2004 07:41, Andrey S.Cherepanov wrote:
> No, for given filename with dot (e.g. "spread.file") extension ".ksp" doesn't append to filename. Expected "spread.file.ksp". Saved as "spread.file". 
Well that's because ".file" looks like an extension already....
Imagine you want to name your kspread files foo.kspread because .ksp looks ugly.
You can actually do that. If .ksp was always appended, then you wouldn't be able to.

The "what's this" help for the checkbox in the file dialog says explicitely
that an extension is added *only* "if no extension is specified".

> This is KOffice-wide problem in file selector dialog. 
KDE-wide actually.

I'm tempted to say there is no bug, since it works as documented.
On the other hand, it makes a difference whether one types the filename first
or selects the type first, since when selecting the type in the Filter combo,
the extension is automatically changed (even when having typed "spread.file").
So this looks a bit inconsistent...

Comment 12 Andrey Cherepanov 2004-05-11 18:23:53 UTC
Most people got used to append *standart* extension (like .ksp in our case). I argee that current behaviour looks a bit inconsistent. Possible, it will be better to append default extension in all cases.

I guess, it's need to change product for this bug.
Comment 13 Clarence Dang 2004-05-12 13:24:59 UTC
On Wed, 12 May 2004 01:30 am, David Faure wrote:
> On Tuesday 11 May 2004 07:41, Andrey S.Cherepanov wrote:
> > No, for given filename with dot (e.g. "spread.file") extension ".ksp"
> > doesn't append to filename. Expected "spread.file.ksp". Saved as
> > "spread.file".
>
> Well that's because ".file" looks like an extension already....
> Imagine you want to name your kspread files foo.kspread because .ksp looks
> ugly. You can actually do that. If .ksp was always appended, then you
> wouldn't be able to.
Exactly, it's like the .htm vs .html and .jpg vs .jpeg debate.

> On the other hand, it makes a difference whether one types the filename
> first or selects the type first, since when selecting the type in the
> Filter combo, the extension is automatically changed (even when having
> typed "spread.file"). So this looks a bit inconsistent...
Suppose the text editor had "text/plain" as the default selected mimetype to 
save in (so that it automatically appends .txt for windows users).  If you've 
opened a .cpp file and click Save As, I don't think the filedialog should 
automatically change "file.cpp" to "file.txt" immediately - that would be 
annoying and inconsistent (File/Save As on an open file should always 
overwrite the current file if no options are changed).  That should only 
happen if you play with the filter combo.

On Wed, 12 May 2004 02:23 am, Andrey S.Cherepanov wrote:
> it will be better to append default extension in all cases.
So if the application passes "file.ksp" as the default filename to save as and 
then user press Ok, it will save as "file.ksp.ksp"?  You could get the 
application/filedialog to strip the extension before the filedialog displays, 
so that only "file" will be in the Location textbox and so that it will 
append the extension to save as "file.ksp" but this doesn't work if you want 
your own extension like ".kspread".  Also think about cases with double 
extensions like '.tar.gz" esp. if you want dots in your filename distinct 
from the extensions.

Using dots in filenames for anything other than extensions is almost like 
using /, ? or *.

Comment 14 Jo Øiongen 2004-07-30 09:51:16 UTC
How about making it an option in Koffice? If you allways want ".ksp" added to your filename "check this" :-)

Cheers Jo
Comment 15 Nicolas Goutte 2005-08-06 20:14:06 UTC
The wish has not moved for a year, so I suppose that it is RESOLVED/WONTFIX.

Have a nice day!