Ticket #4000 (closed Bug report: fixed)

Opened 6 years ago

Last modified 6 months ago

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

Reported by: Dark1337 Owned by:
Priority: high Component: FileZilla Client
Keywords: linux file_editing default_editor Cc: francesconegri@…
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

fz-gedit.png Download (197.7 KB) - added by Dark1337 6 years ago.

Change History

Changed 6 years ago by Dark1337

  Changed 6 years ago by codesquid

  • status changed from new to moreinfo

Which version of FileZilla are you using?

  Changed 6 years ago by Dark1337

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.

  Changed 5 years ago by fnegri

  • status changed from moreinfo to new
  • priority changed from normal to high
  • keywords file_editing added; txt removed
  • component changed from FileZilla Server to FileZilla Client
  • cc francesconegri@… added

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

  Changed 5 years ago by essoft

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.

  Changed 5 years ago by fnegri

  • keywords default_editor added; gedit removed
  • os_version changed from Ubuntu 8.04 64 bit to Ubuntu 9.04
  • summary changed from Cant open text files properly in gedit from filezilla to Filename 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)

follow-up: ↓ 7   Changed 5 years ago by codesquid

  • status changed from new to moreinfo

Does this problem still exist in 3.2.7.1?

in reply to: ↑ 6   Changed 5 years ago by mdmcginn

  • status changed from moreinfo to new
  • os_version changed from Ubuntu 9.04 to Ubuntu 9.10

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.

  Changed 5 years ago by codesquid

  • status changed from new to closed
  • resolution set to fixed

Will be fixed in FileZilla 3.3.0

Note: See TracTickets for help on using tickets.