aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/run_parts.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index cb4a4e4c7..42170bcb8 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -60,10 +60,7 @@ struct globals {
60 */ 60 */
61static bool invalid_name(const char *c) 61static bool invalid_name(const char *c)
62{ 62{
63 const char *base_name = strrchr(c, '/'); 63 c = bb_basename(c);
64
65 if (base_name)
66 c = base_name + 1;
67 64
68 while (*c && (isalnum(*c) || *c == '_' || *c == '-')) 65 while (*c && (isalnum(*c) || *c == '_' || *c == '-'))
69 c++; 66 c++;