Re: vfat file system does not allow a space at the end of a directory name

From: Theodore Ts'o
Date: Mon Jul 31 2023 - 10:27:08 EST


On Mon, Jul 31, 2023 at 07:55:39AM +0200, Thomas Weißschuh wrote:
> On 2023-07-30 23:33:03+0100, Chris Ward wrote:
> > I had a zip file (from downloading pictures from Google Photos) where
> > some of the directory names had a space at the end. This unzipped fine
> > on an ext4 file system, but gave errors when unpacking onto a USB key
> > which had a FAT file system.
>
> AFAIK this is a limitation in the FAT filesystem itself.
>
> The problem is that FAT stores filenames in fixed width fields.
> Unused space in these fields is filled with ' '.
> This means that storing "foo", "foo " or "foo ". would all result in the
> exact same result and it will be impossible to figure out the correct
> one afterwards.

Yeah, I'd argue that this is a misfeature in Google Photos; its
product manager should strongly consider stripping trailing spaces
from picture titles.

Disclosure: I work for Google but not anywhere near the Google Photos
product team, and this is my own opinion not Google's. Feel free to
file product feedback in the Google Photos app, though. :-)

- Ted