diff options
Diffstat (limited to 'lib/dpkg/path-remove.c')
-rw-r--r-- | lib/dpkg/path-remove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dpkg/path-remove.c b/lib/dpkg/path-remove.c index ab26b4a8d..ef9cde7b5 100644 --- a/lib/dpkg/path-remove.c +++ b/lib/dpkg/path-remove.c @@ -24,7 +24,6 @@ #include <sys/stat.h> -#include <assert.h> #include <errno.h> #include <string.h> #include <unistd.h> @@ -122,7 +121,8 @@ path_remove_tree(const char *pathname) const char *u; u = path_skip_slash_dotslash(pathname); - assert(*u); + if (u[0] == '\0') + internerr("pathname '%s' reduces to nothing", pathname); debug(dbg_eachfile, "%s '%s'", __func__, pathname); if (!rmdir(pathname)) |