It is what I'd expect. Now, use cp -R to copy the file
_with its directory_, and see if that fares better. If not - bad
implementation of fs and/or cp. The way I see file-as -directory
is that _file_ operations (like the reads issued by cat) only
work on the file part. You want the directory part? Use
directory operations such as those "cp -R" use.
It is going to copy the _file_ part, of course. I wouldn't
expect anything else - "cat" doesn't deal with directories.
This also raise the question of when to use file-as-directory.
A usage where you need everything to follow the file, even
when using "cat" calls out for an application that puts everything
into one file. Directory-as-file is the wrong tool for that job, so don't
worry about such problems.
Sticking thumbnails in a file-as-dir is another story though. Move the
file (with "mv a b", not "cat a>b;rm a") moves the image file _and_ the
thumbnail. No time wasted on regenerating thumbnails, no disk space
or cleanup time wasted on dangling thumbs. Use the image file
for its intended purposes (view it, mail it off, serve it on the web,
edit it, print it) and the thumbnail doesn't get in the way
because it isn't embedded in the file format. Embedding it
in the file might work for jpeg which support generic embedded data,
it surely won't work for every image format out there.
This is my idea of how file-as-directory should work.
Helge Hafting
Helge Hafting