#5 Allow to specify files with a name starting with '-'

closed-fixed
nobody
None
5
2007-10-25
2006-04-01
lazy.et
No

$ echo "something" > -file
$ ls -l -- -file
-rw-rw---- 1 me me 6 apr 1 18:57 -file
$ ./ed2k_hash -file
ERROR:unknown command line option '-f'
The help screen

This patch permits to specify a end of options marker,
I choosed the GNU usual '--'

after applying this patch:
$ ./ed2k_hash -- -file
ed2k://|file|-file|10|fddd343b76c9cc6de457b998d33b4c0e|

Discussion

  • Tim-Philipp Muller

    • status: open --> closed-fixed
     
  • Tim-Philipp Muller

    Logged In: YES
    user_id=583691
    Originator: NO

    You probably care any more after all this time (sorry about that), but it's committed now anyway:

    2007-10-25 uberdork

    patch by: lazy.et <lazyet users sourceforge net>

    * ed2k_hash/cl_ui.c (ui_setoptions):
    * ed2k_hash/options.c (options_print_help_screen_and_exit):
    Add -- command line option to separate option arguments from
    filenames, so that it's possible to hash files that start with a
    hyphen (without using an absolute path or ./-foo). Closes: #1462750

     

Log in to post a comment.