12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include <config.h>
- #include "dirname.h"
- bool
- strip_trailing_slashes (char *file)
- {
- char *base = last_component (file);
- char *base_lim;
- bool had_slash;
-
- if (! *base)
- base = file;
- base_lim = base + base_len (base);
- had_slash = (*base_lim != '\0');
- *base_lim = '\0';
- return had_slash;
- }
|