fails on files with names ending in space

Bug #87246 reported by Peter Cordes
6
Affects Status Importance Assigned to Milestone
fslint
Fix Released
Medium
Pádraig Brady
fslint (Ubuntu)
Fix Released
Undecided
Pádraig Brady

Bug Description

Binary package hint: fslint

I ran fslint-gui in duplicate-check mode over my multimedia collection, and it reported this error:

exceptions.OSError: [Errno 2] No such file or directory: '/mnt/unpackfs/data/shared/downloaded/showtunes/02 -'

 I have a file with that name, except with a trailing space. I don't know why I had such a file, so don't ask...

 This came from the python part of program, since I followed its progress, first traversing the tree, then md5sum, then sha1sum, then python. (can there be a tickbox to turn off one or the other of sha1/md5sum in the gui? The chances of an accidental collision are pretty low.) fslint is slow enough already, esp. when running over a FUSE mount (unpackfs in my case). I'll try the command line options...

 I looked at the shell script, but I don't have a fix for the bug.

Revision history for this message
Dan (dans-nwisrl) wrote :

If it helps -

I discovered a similar bug dragging & dropping for copy purposes. When working with a file with a trailing space in the name, drag-n-drop copy from folderA on my hard drive to folderB on my hard drive worked as expected. Drag-n-drop copy from anywhere on my hard drive to my usb flash drive failed. I only have one partition on my one hard drive, so I couldn't test other device-to-device copies.

Thanks for a great product!

Dan

Changed in fslint:
assignee: nobody → p-draigbrady
importance: Undecided → Medium
status: New → Fix Committed
assignee: nobody → p-draigbrady
status: New → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Rocko (rockorequin) wrote :

It might not be a problem with fslint specifically - I think it's in the vfat drivers.

eg you can't even do this command if /media/vfat-drive is a fat32 drive:

 "mv /media/vfat-drive>/file /media/<vfat-drive>/file\ "

If you try, it complains that it can't move the file to a subdirectory of itself. Similarly if you try to rename files in Nautilus, except it just says it can't do it.

It's fine though if you do it on an ext3 drive.

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

There was an issue in FSlint when dealing with filenames with trailing spaces.
That has been fixed upstream.

I've confirmed on 2.6.23.1-49.fc8 the separate vfat issue,
where one can't create a file with a trailing space in the first place.

$ touch "t "
touch: setting times of `t ': No such file or directory

I also have a tentative report from a user indicating
that the `find` command is returning filenames containing
spaces escaped with backslashes.

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

I contacted OGAWA Hirofumi the linux VFAT maintainer,
who said trailing spaces are not allowed in FAT :)

Changed in fslint:
status: In Progress → Fix Released
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.