[Bug 228448] [PATCH] `unlink -foo` , the original use of `unlink`, no longer works.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Sep 6 20:36:58 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228448

Ed Maste <emaste at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |emaste at freebsd.org

--- Comment #1 from Ed Maste <emaste at freebsd.org> ---
Thanks for the submission and I'd like to see this get fixed for 12.0.

It appears this was broken by r97533, but I don't really understand why that
change was made. I guess I can see value in supporting "unlink -- file" but
don't see a reason to call getopt. Perhaps we ought to just

if (argv == 2)
  unlink(argv[1])
else if (argv == 3 && argv[1] == "--")
  unlink(argv[2])

The man page in your patch needs one more minor update: s/Either of these/Any
of these/.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list