Issue 57274 - DATALOSS: Space in document path allows silent overwrites
Summary: DATALOSS: Space in document path allows silent overwrites
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 2.0
Hardware: All Linux, all
: P2 Trivial (vote)
Target Milestone: ---
Assignee: mmeeks
QA Contact: issues@framework
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2005-11-03 07:27 UTC by jvance
Modified: 2006-06-30 23:02 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jvance 2005-11-03 07:27:27 UTC
Environment:
SuSE 9.3
KDE 3.4
OpenOffice.org 2.0.0 final, SuSE RPM

Putting a space in the path of a document allows it to be silently overwritten.
 The space can be in a directory, or in the file's name.

Reproducible: 
always

Steps to reproduce:

Create a document with a space in its name in OOo's working directory.  My
Document.odt, for example.
Open OpenOffice.org Writer.
Click on file | save as
double click on My Document.odt
OOo Writer will overwrite My Document.odt with an empty document, with no warning.

Create a folder called Test Folder (note the space)
Place a document in that folder, e.g. MyDocument.odt (note no spaces)
Open OOo Writer, click on file | save as
open Test Folder in the Save As dialog
double click on MyDocument.odt.
OOo Writer overwrites the document with no warning.

Create a document called CantOverwrite.odt in OOo's working directory
Open OOo Writer, click on file | save as, double click on CantOverwrite.odt
A warning popup appears: 'A file named "file:///$WORKING_DIR/CantOverwrite.odt"
already exists. Are you sure you want to overwrite it?'
This is the expected behavior.

This bug is a resubmission/refinement of 55882.
Comment 1 thorsten.martens 2005-11-03 09:26:04 UTC
Not reproducible with a m131 or m135 build on Suse Linux 10 with OOo own
filepicker or gtk-filepicker. A warning message appears when doubliclicking on
an existing file.
Comment 2 thorsten.martens 2005-11-03 09:30:32 UTC
closed
Comment 3 jvance 2005-11-03 10:16:12 UTC
Please test in the environment specified.  This is a problem with OOo's
invocation of the KDE file dialog.  Kword does not exhibit this behavior.  Kate
does not exhibit this behavior.  Kwrite does not exhibit this behavior.  OOo
DOES exhibit this behavior, under KDE 3.4.

All of these applications use the KDE file dialog.  However, OOo is clearly
passing different information to or reading different information from the
dialog.  Kate, Kwrite, or Kword will report "A file named 'foo.txt' already
exists".  However, OOo will report "A file named 'file:///bar/baz/blech/foo.txt'
already exists.  Looks like it's passing the file URI instead of the unadorned
file name to the KDE dialog.

Comment 4 thorsten.martens 2005-11-03 10:37:46 UTC
Checked again with a Suse 9.3, KDE 3.4 and OOo 2.0. Problem doesn´t occur and is
nt reproducible. OOo doesn´t use a KDE-file dialog. It has it´s own one. So
errormessages may be different. A doubleclick on an existing file within OOo´s
own file-dialog raises an overwrite-warning.
Comment 5 thorsten.martens 2005-11-03 10:39:06 UTC
closed
Comment 6 jvance 2005-11-03 10:59:44 UTC
Please go to Tools | Options | OpenOffice.org | General, and make sure that "use
OpenOffice.org dialogs" is unchecked.  OOo definitely _is_ using the KDE file
dialog on my installation.

The problem goes away when the above option is checked, but returns when it is
unchecked.
Comment 7 thorsten.martens 2005-11-03 11:03:51 UTC
Not an OOo-issue. OpenOffice doesn´t have a KDE-filepicker and when using OOo on
KDE, the checkbox is hidden. The checkbox is only displayed and usable when
using Gnome.
Comment 8 thorsten.martens 2005-11-03 11:15:06 UTC
TM->mmeks: please have a look. Not reproducible in OpenOffice. 
Comment 9 jvance 2005-11-03 11:19:04 UTC
 Do you have the OpenOffice_org-kde-2.0.0 RPM installed? 
Comment 10 jvance 2005-11-03 12:13:25 UTC
This is looking like a kdefilepicker issue.  I am downloading the source rpm
right now, and if kdefilepicker.cxx is in it, I'll take a look.  Could someone
point me to debug SuSE RPMs for OOo 2.0 and OOo-KDE RPM?
Comment 11 jlp 2005-12-25 02:58:33 UTC
I think I have a problem that is the same bug as this. Or maybe it is caused by
the same bug.

I just compiled OpenOffice.org 2.0.1, with support for KDE. I have a document on
my harddrive with the full path of
/home/rene/Å ola/Kemija/Nanotehnologija.odt
But if I try to open it from within OOo I get an error message:
/home/rene/%A9ola/Kemija/Nanotehnologija.odt does not exist.
Notice that the nonlatin character Å  got replaced by %A9

If I double click on the same file in Konqueror it opens just fine. It also
opens just fine from within OOo if I enable to use OOo open/save dialogs instead
of KDE ones.
Comment 12 jmeastman 2006-02-22 17:18:31 UTC
While attempting to reproduce this with the latest KDE (3.5.1 level "a") from
SUSE LinuKS (http://www.novell.com/linux/download/linuks/index.html) with
OpenOffice_org-2.0.0-1.1 rpms installed I continue to see the problem.

Some additional observations:

I can reproduce this every time when attempting to save to a file where a
directory in the path contains a space.

 * This is definitely related, and only reproducable, with the native dialogs.

 * If I use another application which uses the native dialogs, for example KWord
(v 1.4.2), I AM presented with the overwrite dialog.

Looking at interaction with the file system, using a debugging tool for our
propeitary file system, I can see some additional information which may be of use.

The file system is queried for a file name where the path has been modified to
replace spaces with '%20' at the point where the dialog is checking for the
existance of the file. Since the 

Example:

File selected to overwrite in dialog has path "/home/user/with space/document.odt"

File system queried for existance of "/home/user/with%20space/document.odt"

File does not exist so application writes out file "/home/user/with
space/document.odt" without prompting user.

I was hoping to file this as a KDE bug, but I cannot reproduce this with
anything but OpenOffice applications using the native dialogs.
Comment 13 hwoarang 2006-06-28 13:32:49 UTC
Reporter, how about using a newer OOo version? (like 2.0.2 or even 2.0.3rc7).
Can you reproduce the same problem ?

Thank you.

Hwoarang
Comment 14 hwoarang 2006-06-30 23:02:24 UTC
Closing for now.

Reporter, fell free to reopen it if necessary. (if you can reproduce with newer
version).

Thank you.

Hwoarang
Comment 15 hwoarang 2006-06-30 23:02:42 UTC
.