diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-24 14:09:48 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-09-18 13:27:33 +0200 |
commit | e3563c1d0d1137d1397463fedeb754db61067677 (patch) | |
tree | 1aae397d0b008fdf884991c6a5243044d30fec8d /rtemsspec | |
parent | specdoc: Make section texts configurable (diff) | |
download | rtems-central-e3563c1d0d1137d1397463fedeb754db61067677.tar.bz2 |
items: Use commonpath() instead of commonprefix()
This ensures that we get a valid path.
Diffstat (limited to 'rtemsspec')
-rw-r--r-- | rtemsspec/items.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rtemsspec/items.py b/rtemsspec/items.py index 4da02dde..2f4d80ac 100644 --- a/rtemsspec/items.py +++ b/rtemsspec/items.py @@ -455,7 +455,7 @@ class ItemCache: def _load_items_recursive(self, base: str, path: str, cache_dir: str) -> None: mid = os.path.abspath(path) - mid = mid.replace(os.path.commonprefix([cache_dir, mid]), "") + mid = mid.replace(os.path.commonpath([cache_dir, mid]), "").strip("/") cache_file = os.path.join(cache_dir, mid, "spec.pickle") try: mtime = os.path.getmtime(cache_file) |