Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#12731 closed Bug report (wontfix)

FileZilla trims trailing spaces from directory names when creating directories, but not when downloading files

Reported by: Jon Penn Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc:
Component version: FileZilla Pro 3.59.0 Operating system type: Windows
Operating system version: 10 (build 19044) x64

Description

I find this issue when connecting via SFTP to MacOS's built-in ssh server, though I expect the issue occurs with all SFTP servers.

To reproduce

  • On the server create a directory ending in a space (ex: "Test ")
  • Add some files to the directory (ex: "1.txt", "2.txt", etc.)
  • Connect to the server via SFTP using FileZilla on Windows
  • Attempt to download the directory

Result

  • FileZilla will create the directory "Test" (notice no space)
  • FileZilla will attempt to download "1.txt" to "Test \1.txt"
  • FileZilla will encounter an error because the folder "Test " does not exist

Workaround

  • Manually create "Test " NOTE: most Windows utilities will trim spaces from a folder name. I was able to create the directory using WSL 1.0
  • Re-try downloading the folder
  • FileZilla will create the folder "Test", but will download files to the "Test " folder you manually created.
  • You can manually delete the empty folder "Test"

Proposed solution

FileZilla should either

  • Correctly create directories with spaces OR
  • Always trim spaces from folder names

Version information

FileZilla Pro
-------------

Version:          3.59.0

Build information:
  Compiled for:   x86_64-w64-mingw32
  Compiled on:    x86_64-pc-linux-gnu
  Build date:     2022-04-11
  Compiled with:  x86_64-w64-mingw32-gcc (GCC) 10-win32 20210110
  Compiler flags:  -O2 -g -Wall -Wextra -Wno-deprecated-copy -ffunction-sections -fdata-sections -Wno-cast-function-type

Linked against:
  wxWidgets:      3.0.6
  SQLite:         3.35.5
  GnuTLS:         3.7.2

Operating system:
  Name:           Windows 10 (build 19044), 64-bit edition
  Version:        10.0
  Platform:       64-bit system
  CPU features:   sse sse2 sse3 ssse3 sse4.1 sse4.2 avx avx2 aes pclmulqdq rdrnd bmi bmi2 adx lm
  Settings dir:   C:\Users\jpenn\AppData\Roaming\FileZilla\

Change History (2)

comment:1 by Tim Kosse, 2 years ago

Resolution: wontfix
Status: newclosed

Trailing spaces are not supported on Windows.

From https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file:

Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

comment:2 by Jon Penn, 2 years ago

See the 2nd proposed solution (Always trim spaces from folder names)

Note: See TracTickets for help on using tickets.