| Message ID | 20260212172327.14204-2-quaresma.jose@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | utils: is_path_on_nfs: strip not existing path | expand |
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 974611bc7..b2bda08cb 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -2269,6 +2269,11 @@ def is_path_on_nfs(path): """ Returns True if ``path`` argument is on a NFS mount. """ + # strip not existing path + if os.path.isabs(path): + while not os.path.exists(path): + path = os.path.dirname(path) + import bb.process fstype = bb.process.run("stat -f -c %T {}".format(path))[0].strip() return fstype == "nfs"