Skip to content

Commit

Permalink
fixup uid/gid being non-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Aug 4, 2024
1 parent 63317a1 commit 1317860
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/rechunk/ostree.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def get_ostree_map(repo: str, ref: str):
# Prefix has a fixed length
# unless filesize is larger than what fits
prefix = len("d00555 0 0")
prefix = len("d00555 ")
hash_len = 64

proc = None
Expand Down Expand Up @@ -47,10 +47,20 @@ def get_ostree_map(repo: str, ref: str):
continue

ofs = prefix - 1
# Link count
# UID
while line[ofs] != " ":
ofs += 1
# Space after
while line[ofs] == " ":
ofs += 1
# GID
while line[ofs] != " ":
ofs += 1
while line[ofs] == " ":
ofs += 1
# Link count
while line[ofs] != " ":
ofs += 1
while line[ofs] == " ":
ofs += 1
# Size
Expand Down

0 comments on commit 1317860

Please sign in to comment.