Skip to content

Commit

Permalink
Don't let user specify lower flags bits, as they depend on the path n…
Browse files Browse the repository at this point in the history
…ame length.
  • Loading branch information
jelmer committed May 19, 2009
1 parent e8c9241 commit f9ca0eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dulwich/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def write_cache_entry(f, entry):
(name, ctime, mtime, dev, ino, mode, uid, gid, size, sha, flags) = entry
write_cache_time(f, ctime)
write_cache_time(f, mtime)
flags = len(name) | flags
flags = len(name) | (flags &~ 0x0fff)
f.write(struct.pack(">LLLLLL20sH", dev, ino, mode, uid, gid, size, hex_to_sha(sha), flags))
f.write(name)
real_size = ((f.tell() - beginoffset + 8) & ~7)
Expand Down

0 comments on commit f9ca0eb

Please sign in to comment.