Hi,
Herman Robak schrieb:
On Wed, 19 Dec 2007 15:40:05 +0100, Burkhard Plaum
<[EMAIL PROTECTED]> wrote:
Hi,
Herman Robak schrieb:
[...]
Disagree.
Spaces are perfeclty legal in UNIX filenames.
Yep. Some non-printable characters are legal, too, if I am not mistaken.
Non-printable characters in file names can trick the user. White-spaces
in file names can cause "interesting" things in shell scripts.
IIRC, the only really forbidden characters are '/' and '\0'.
Once I managed to create a file with a multiline name ('\n' is legal too),
and it was fun watching different programs freaking out on it. But thats long
ago and certainly a corner case :)
Not all legal filenames are wise file names.
That's right, but users of GUI apps (like cinelerra), don't want to learn which
filenames are wise. Also the definition of "wise" stronly depends on whether a
shell is involved or not. Many GUI users (even on Linux nowadays) never use a
shell
directly.
It's never a problem if the filename is passed from the GUI directly to
fopen(). For MPEG video encoding, it's only a broken because popen()
launches a subshell, which executes the mpeg2enc command. IMO if cinelerra is
smart
enough to launch a shell, it should also be able to correctly pass filenames to
it.
If filenames are quoted by "" or '' (which is sufficient for spaces at least),
it's a
one-line patch.
UNIX Software, which doesn't support all legal UNIX filenames, is broken.
Most shells are broken in that sense. And that's quite annoying.
Agree, that it's sometimes annoying, but they are not broken.
It's a fundamental property of a shell, that it has "special characters" like
all other programming/scripting languages (otherwise it would be impossible to
implement most of the functionality). The space is used to separate commandline
arguments.
Other characters like *&$>| are also special and must be escaped or quoted, if
they are meant literally.
These are basic usage rules for shells. If you follow them, everything is fine.
If not, you get what you deserve. If you don't like that, don't use a shell.
Plain simple :)
Burkhard
_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra