Re: Variations 0.41c and renaming files to camera date
- From: druck <news@xxxxxxxxxxxxxxxx>
- Date: Wed, 23 Jan 2008 20:33:38 GMT
On 23 Jan 2008 Paul Vigay <invalid-email-address@xxxxxxxxxxxxxxxxxxxx>
wrote:
In a dim and distant universe <MPG.22008bedf1519c3e9897ed@xxxxxxxxxxxxxxxx>,
Greg Harris <greg@xxxxxxxxxxxxxxxxxx> enlightened us thusly:
Agreed that RISCOS 'prohibits' the use of spaces but the majority of the
rest of the world does not.
A space in filenames is a really bad idea (possibly not actually forbidden
per se, but no one but a complete idiot would use them) because a space
will confuse many operating systems (such as Linux and Mac OS X) who expect
a space to delimit additional parameters, and if you forget to specify
filename delimiters such as " marks around the name with spaces in it, you
can run into all kinds of problems where the name becomes the parameters of
the command you're running.
Windows makes a complete pigs ear of implementing spaces in filenames,
which shouldn't really come as a surprise. Because it uses spaces
between parameters, and allows spaces in filenames, and doesn't have
strict rules on applying quote marks or escaping spaces, it doesn't
know what its doing and has to guess. Take for example this command
line:-
C:\Program Files\A program.exe C:\Documents and Settings\Myfile
The way it has to work out this mess is to try each space delimited
field separately to see if it is a file, and if it doesn't exit try to
coalesce the subsequent parts. So above it tries the following:-
"C:\Program Files\A" - doesn't exist
"C:\Program Files\A program.exe" - exists so use as program
"C:\Documents" - doesn't exist
"C:\Documents and" - doesn't exist
"C:\Documents and Settings\Myfile" - exists so use as argument
You can see the massive security hole this exposes, allowing the
system to be compromised by creating files with the intermediate names
it looks for. Even ignoring that, given there are normally several
more levels of directories in real pathnames, the huge number of file
accesses it needs just to work out the command line, compared to just
2 which would be used if things were done properly.
Another reason why we've got away with running RISC OS with a couple
of hundred MHz, where as the Windows world needs several cores of
multi GHz just to get by.
---druck
--
The ARM Club Free Software - http://www.armclub.org.uk/free/
The 32bit Conversions Page - http://www.quantumsoft.co.uk/druck/
.
- References:
- Re: Variations 0.41c and renaming files to camera date
- From: tim
- Re: Variations 0.41c and renaming files to camera date
- From: News poster
- Re: Variations 0.41c and renaming files to camera date
- From: druck
- Re: Variations 0.41c and renaming files to camera date
- From: Greg Harris
- Re: Variations 0.41c and renaming files to camera date
- From: Adam
- Re: Variations 0.41c and renaming files to camera date
- From: Greg Harris
- Re: Variations 0.41c and renaming files to camera date
- Prev by Date: Re: Variations 0.41c and renaming files to camera date
- Next by Date: Re: Minor updates to 7backup tool
- Previous by thread: Re: Variations 0.41c and renaming files to camera date
- Next by thread: Re: Variations 0.41c and renaming files to camera date
- Index(es):
Relevant Pages
|