On 25/10/2007, David Vasek <[EMAIL PROTECTED]> wrote:
> On Thu, 25 Oct 2007, Edd Barrett wrote:
>
> > The directory made has been truncated msdos style. "a_frag~1".
> > Therefore when cp tries to copy files into the new directory, it can't
> > find the new filename.
> >
> > The workaround is to do something like this, with a shorter filename
> > ---8<---
> > # cp -R a_fragile_hope /mnt/usb/a
> > ---8<---
>
> While this is a workaround, mounting it with "-l" parameter (mount_msdos
> -l) should be the proper solution. Of course, unless you need to keep the
> filenames short.
>
> On the other hand, one would expect the filesystem code to truncate the
> filename before actually trying to open a file on such a filesystem. I
> think that Msoft designed it that way. Currently, you create a file and
> cannot stat it immediately afterwards. Oh, and a different new file has
> appeared there in the meantime! I think it shouldn't work this way. Is it
> a valid assumption?

Be VERY careful with LFN support and 8.3 filenames. MS' implementation
of LFN support is broken by design, because the short filenames are
not saved along with the long ones and instead are autogenerated from
the long ones -- which, if you have a set of similarly named files
with long filenames can easily result in a 8.3 filename referring to a
different file after you delete and copy.

See the section "Ambiguous LFNs" here:
http://users.iafrica.com/c/cq/cquirke/lfns.htm

The upshot is, you're best off avoiding these older 8.3 FAT file
systems altogether.

Reply via email to