Hello Tito,

2014-06-22 22:57 GMT+02:00 tito <[email protected]>:
> On Sunday 22 June 2014 22:43:16 tito wrote:
>> Hi,
>> sadly the applied version misbehaves with files starting with a dash:
>>
>> echo > -test
>> ls -la
>> -rw-r--r--  1 tito tito      1 Jun 22 22:24 -test
>> ./busybox unlink -test
>> unlink: invalid option -- 't'
>>
>> even quoting does not help:
>>
>>  ./busybox unlink "-test"
>> unlink: invalid option -- 't'
>> ./busybox unlink '-test'
>> unlink: invalid option -- 't'
>>
>> BTW.: also the original unlink program
>> shows this problem, maybe a bug
>> report should be filed upstream .
>>
>> echo > -test
>> debian:~/Desktop/SourceCode/busybox$ unlink -test
>> unlink: invalid option -- 't'
>> Try `unlink --help' for more information.
[...]
>> Ciao,
>> Tito
>>
>
> Hi,
> be studying further the matter files starting with a dash
> could be successfully removed with bb's and original unlink with:
>
> echo > -test
> unlink -- -test
>
> so eventually the patch could be dropped.
>
> Ciao,
> Tito

You could also use /absolute/-paths or ./-relative-paths. But '--' is
used to separate options from arguments (in applications that support
it, e.g. those which use getopt), so the "canonical" way is using
double-dashes.

Cheers,

Xabier Oneca_,,_
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to