Opened 18 years ago

Closed 16 years ago

Last modified 11 years ago

#3032 closed Bug report (fixed)

Problems with leading or terminating spaces

Reported by: nocarrier Owned by:
Priority: low Component: FileZilla Client
Keywords: Cc: nocarrier, Alexander Schuch, Tim Kosse, elisee, azurazu
Component version: Operating system type:
Operating system version:

Description

Like the prev. bug, but also FZ ignores starting spaces
and puts the files in queue without them. Then -
critical error.

Change History (17)

comment:1 by Alexander Schuch, 18 years ago

I just tried with FileZilla 3 beta 2 and it works for me.
The file gets added to the queue with a leading space, and
then gets uploaded to the server and removed from the queue
afterwards. FileZilla 3 beta 2 didn't crash either.

Can you please re-try with your server?

comment:2 by nocarrier, 18 years ago

Hi,
I just download and install FileZilla Server 0.9.19beta and
FileZilla Client 3.0.0 beta 2, both the last versions.

Neither FZ client 2x nor 3x shows the starting space of the
file.

The embedded windows command line ftp shows acorrect, but
cannot get the file.

Firefox didn't shows the starting space, but manualy can get
the file, adding empty space before the file name.
The client is set to use unicode support if available.

Some useful information from the server log:
All tested ftp clients sent

RETR 1181901-dc31d79f5129b3d7.jpg - didn't sucseeded

Firefox sent

RETR / 1181901-dc31d79f5129b3d7.jpg and sucseeded.

comment:3 by Alexander Schuch, 18 years ago

FileZilla 3 was not able to manually get the file?

comment:4 by Alexander Schuch, 18 years ago

For a related bug, see #1455638.

comment:5 by nocarrier, 18 years ago

Try it yourself. The ftp with this account will be valid
till the end of the week.
ftp://test:tset@koko.cybcom.net/%201181901-dc31d79f5129b3d7.jpg
host: koko.cybcom.net
user: test
pass: tset

comment:6 by Tim Kosse, 18 years ago

The problem is that the specifications for the FTP protocol
are incomplete, especially regarding the format of directory
listings. There is no way to detect if a file's name on the
server has a leading space.
Adding upload capability for files with leading spaces
should be possible. Download capability however won't be
possible that easily.

comment:7 by nocarrier, 18 years ago

I forgot to tell that you can rename any file, adding a
space before it's name. But there are no chance to re-rename
or remove the space.

comment:8 by Alexander Schuch, 18 years ago

From bug report #1095795:

when you have a leading blank in a filename, filezilla
cannot download ist (i made this experience with files in
a very long path) - i have the latest version 2.2.9

work around: manual editing of source filename in queue
xml file solves the problem

comment:9 by Alexander Schuch, 18 years ago

Information from other related report (closed as duplicate)

Filezilla cannot navigate into a directory that has a
space after its name. For example, if a directory is
called "Gross Margin "(notice the space at the end),
Filezilla gives a "No such file or directory" error
since it seems to parse the space out of the directory
name.

same thing occurs if there is a space in front of the file
or directory name.

comment:10 by Alexander Schuch, 18 years ago

Related bug report:
[ 1446311 ] cannot delete or rename directory with spaces

comment:11 by Alexander Schuch, 17 years ago

Taken from (deleted as duplicated) RFE:
[ 1731563 ] Name endings with trailing spaces cause troubles

"So, the command used to change directory, instead of 'chdir dirname', must be 'chdir "dirname "'.

Perhaps FZ must remove trailing spaces before executing a command... It's
yours to see."

comment:12 by elisee, 17 years ago

I'm confirming this bug I just experienced.

I wanted to send a file "neverputt.ogg" which I accidentally misnamed "neverputt.ogg ". FileZilla sent the file but, after I understood I had misnamed it, I was not able to rename it. So I had to use nautilus which worked perfectly for this. If Nautilus can manage it correctly, I don't see the point FileZilla not doing it the correct way. Terminating spaces at least should be handled, shouldn't they?

Thanks a lot for your work, keep it up!

comment:13 by azurazu, 16 years ago

Problem still exists in 3.0.11 build-date 2008-06-15 on Win32.

After enqueueing:

Command: cd "New Folder.1 "
Response: New directory is: "/home/username/folder/New Folder.1 "
Command: ls
Status: Listing directory /home/username/folder/New Folder.1
Status: Directory listing successful
Response: fzSftp started
Command: open "username@…" 22
Status: Connected to box.name
Status: Starting download of /home/username/folder/New Folder.1/1-2 Some File.ext
Command: cd "/home/username/folder/New Folder.1"
Error: Directory /home/username/folder/New Folder.1: no such file or directory
Command: mtime "/home/username/folder/New Folder.1/1-2 Some File.ext"
Error: get attrs for /home/username/folder/New Folder.1/1-2 Some File.ext: no such file or directory

Note how the trailing space is vanishing.

comment:14 by Tim Kosse, 16 years ago

Component: OtherFileZilla Client

comment:15 by Marc, 16 years ago

I'm using FZ Client 3.2.3.1 and this problem persists. Is this problem solvable in the code?

comment:16 by Tim Kosse, 16 years ago

Resolution: fixed
Status: newclosed

The next version will support leading or trailing spaces. Only condition is that the server supports MLSD.

in reply to:  description comment:19 by Peter Zelchenko, 11 years ago

Replying to nocarrier:

Like the prev. bug, but also FZ ignores starting spaces
and puts the files in queue without them. Then -
critical error.

Temporary workaround if you need to get to your files:

In the "Remote site:" field, type the directory exactly, including any leading spaces:

/Volumes/SAN/Data/Users/john/ My stuff
(note leading space above)

This will take you to the directory. You can also use psftp (from PuTTY) to modify the directory names permanently.

Note: See TracTickets for help on using tickets.