mercurial/revlog.py
branchstable
changeset 50814 4a3a9d961561
parent 50686 a41eeb877d07
child 50928 d718eddf01d9
child 51077 74c004a515bc
--- a/mercurial/revlog.py	Fri Jul 21 15:15:43 2023 +0200
+++ b/mercurial/revlog.py	Fri Jul 21 15:50:56 2023 +0200
@@ -2131,11 +2131,14 @@
 
         The file will only exist if a splitting operation is in progress, but
         it is always expected at the same location."""
-        parts = os.path.split(self.radix)
+        parts = self.radix.split(b'/')
         if len(parts) > 1:
             # adds a '-s' prefix to the ``data/` or `meta/` base
             head = parts[0] + b'-s'
-            return os.path.join(head, *parts[1:])
+            mids = parts[1:-1]
+            tail = parts[-1] + b'.i'
+            pieces = [head] + mids + [tail]
+            return b'/'.join(pieces)
         else:
             # the revlog is stored at the root of the store (changelog or
             # manifest), no risk of collision.