avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] [bug #6764] -U syntax doesn't allow full paths in Wind


From: E. Weddington
Subject: Re: [avrdude-dev] [bug #6764] -U syntax doesn't allow full paths in Windows
Date: Tue, 25 Nov 2003 15:30:12 -0700

On 25 Nov 2003 at 20:44, Joerg Wunsch wrote:

> As address@hidden wrote:
> 
> > The parsing is done on the colon first, not grouping on
> > quotes. Doulbe quotes would also be needed to handle spaces in the
> > pathname, which is allowable on Windows. Example:
> 
> Spaces in path names are allowable in Unix as well.  Generally, any
> character except a slash and a NUL char is allowable. :-)  (Using a
> newline inside a filename is not a very good idea though. ;-)
> 
> Note that the quotes will (usually) be eliminated by the shell, so the
> application will only see the string including the spaces, but that
> should be fine.  (If you escape the quote with a backslash, the shell
> will pass it down, that's the way how you access a filename that
> contains a quote...)
> 
> So the only problem is that the colon serves both as a delimiter for
> the fields in the -U option, as well as a possible part of a
> legitimate filename.  It could be argued that a colon is a poor choice
> for a field delimiter in -U then, but see above, since under Unix any
> character is a legitimate filename character (the slash will be
> allowable here as well, obviously), any character is an equally poor
> field delimiter. ;-)
> 
> The attached patch is supposed to solve the problem.  It does this by
> looking for the rightmost colon when the parser reaches the file name
> component, and if we found one, using anything up to that colon as the
> file name (which then might contain any number of colons).  So the
> only side effect is that file names containing a colon will make the
> trailing :format specification mandatory (i. e., you need to append
> a :a).
> 

Patch looks good. Tested ok. I read flash to a file containing a drive 
letter and colon with spaces in the filename, and it worked.

The docs should definitely say something about this. Something like:

For Windows users, if the file name contains a drive letter colon, you must 
specify a format after the file name for the command-line option to parse 
correctly. If the file name contains spaces, you must enclose the filename 
in double quotes.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]