← Commit list

2d9e09796

Denys Vlasenko
Denys Vlasenko
2019-01-06
SUCCESS Duration: 150s

Subject

find: handle leading -- argument

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

findutils/find.c+6 -0
@@ -1467,6 +1467,12 @@ int find_main(int argc UNUSED_PARAM, char **argv)
break;
if (!saved[1])
break; /* it is "-" */
+ if (saved[1] == '-' && !saved[2]) {
+ /* it is "--" */
+ /* Try: find -- /dev/null */
+ saved = *++past_HLP;
+ break;
+ }
if ((saved+1)[strspn(saved+1, "HLP")] != '\0')
break;
}