Skip to content

Commit 91e8739

Browse files
committed
Replace os.path.commonprefix with os.path.commonpath
See https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix
1 parent 869b88d commit 91e8739

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bagit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ def _path_is_dangerous(self, path):
946946
real_path = os.path.normpath(real_path)
947947
bag_path = os.path.realpath(self.path)
948948
bag_path = os.path.normpath(bag_path)
949-
common = os.path.commonprefix((bag_path, real_path))
949+
common = os.path.commonpath((bag_path, real_path))
950950
return not (common == bag_path)
951951

952952

0 commit comments

Comments
 (0)