Opened 15 years ago

Closed 14 years ago

Last modified 10 years ago

#4000 closed Bug report (fixed)

Filename is not quoted properly when choosing "default editor for text files"

Reported by: Joe Miller Owned by:
Priority: high Component: FileZilla Client
Keywords: linux file_editing default_editor Cc: francesconegri@…
Component version: Operating system type: Linux
Operating system version: Ubuntu 9.10

Description

If I open a txt file with spaces in it's name it will open a few blank tabs instead.

Attachments (1)

fz-gedit.png (197.7 KB ) - added by Joe Miller 15 years ago.

Download all attachments as: .zip

Change History (9)

by Joe Miller, 15 years ago

Attachment: fz-gedit.png added

comment:1 by Tim Kosse, 15 years ago

Status: newmoreinfo

Which version of FileZilla are you using?

comment:2 by Joe Miller, 15 years ago

Sorry, I compile it from source so 3.1.5.1.
I was just about to head into work so I rushed this a bit.

comment:3 by Francesco Negri, 15 years ago

Cc: francesconegri@… added
Component: FileZilla ServerFileZilla Client
Keywords: file_editing added; txt removed
Priority: normalhigh
Status: moreinfonew

i can reproduce that.

with default settings, selecting "view/edit" on a remote file calls
"gedit filename with spaces"
where spaces in filename are not quoted so gedit downloads a single file named "filename with spaces" but then tries to open three non-existent files ("filename", "with", "spaces")

moreover, if you edit "testfile" in one remote dir, and "testfile" in another dir, filezilla creates "testfile" and "testfile 2" in the temp folder, but then calls
gedit testfile
gedit testfile 2
the second command opens the wrong file (testfile) and a non-existent file named "2"

i'm using ubuntu 9.04, it could be a problem with ubuntu's "default editor" but i guess filezilla should properly quote spaces in filename as well

comment:4 by essoft, 15 years ago

I got around this issue by creating a shell script to put the filename in quotes:

#! /bin/bash
gedit "$1"

I saved this file as gedit.sh within my home directory. I then set the default editor under 'Use custom editor' in FileZilla to:

/bin/sh [full path to the shell script above]

(e.g.
/bin/sh /home/edward/Scripts/gedit.sh)

I hope this helps anyone having the same problem.

comment:5 by Francesco Negri, 15 years ago

Keywords: default_editor added; gedit removed
Operating system version: Ubuntu 8.04 64 bitUbuntu 9.04
Summary: Cant open text files properly in gedit from filezillaFilename is not quoted properly when choosing "default editor for text files"

there is an even simpler workaround: just go to edit - settings - file editing,
choose "use custom editor" and type "/usr/bin/gedit".

the bug is reproducible only when choosing "use system's default editor for text files", even if it is set to something different than gedit (e.g. gvim)

comment:6 by Tim Kosse, 15 years ago

Status: newmoreinfo

Does this problem still exist in 3.2.7.1?

in reply to:  6 comment:7 by Michael McGinnis, 14 years ago

Operating system version: Ubuntu 9.04Ubuntu 9.10
Status: moreinfonew

Yes, the problem still exists in 3.2.7.2 and 3.2.8.1 on Ubuntu 9.10 and 9.04. For example, when I open "index.html" from one remote server folder, it appears in gedit as "index.html". When I open "index.html" in another server folder (same filename, different file because it's in a different location), it appears in gedit as two files: "index" and "2.html". When I change my settings to "custom editor" and "/usr/bin/gedit" as described by fnegri, it opens as "index 2.html" No problem when working with local files. This is the most annoying bug I've encountered since installing my operating system.

comment:8 by Tim Kosse, 14 years ago

Resolution: fixed
Status: newclosed

Will be fixed in FileZilla 3.3.0

Note: See TracTickets for help on using tickets.