Skip to content

Commit a59ee1f

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

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
@@ -936,7 +936,7 @@ def _path_is_dangerous(self, path):
936936
real_path = os.path.normpath(real_path)
937937
bag_path = os.path.realpath(self.path)
938938
bag_path = os.path.normpath(bag_path)
939-
common = os.path.commonprefix((bag_path, real_path))
939+
common = os.path.commonpath((bag_path, real_path))
940940
return not (common == bag_path)
941941

942942

0 commit comments

Comments
 (0)