compensate for the new header when debugging the overlay

Summary:
I'm trying to troubleshoot why a new dir that I added isn't showing up in the overlay and I found that the debug tool doesn't know about the overlay.

This is the dumbest minimal thing I could do to make this basically functional again

Reviewed By: simpkins

Differential Revision: D5602439

fbshipit-source-id: 4ae7fa34136697f9f915ccd95275cb3a7923ae4a
This commit is contained in:
Wez Furlong 2017-08-10 11:30:54 -07:00 committed by Facebook Github Bot
parent 20c62ae2bf
commit 39b21f383b

View File

@ -189,9 +189,11 @@ def _load_overlay_tree(overlay_dir: str, inode_number: int) -> OverlayDir:
with open(overlay_file_path, 'rb') as f: with open(overlay_file_path, 'rb') as f:
data = f.read() data = f.read()
assert data[0:4] == b'OVDR'
tree_data = OverlayDir() tree_data = OverlayDir()
protocol_factory = TCompactProtocol.TCompactProtocolFactory() protocol_factory = TCompactProtocol.TCompactProtocolFactory()
Serializer.deserialize(protocol_factory, data, tree_data) Serializer.deserialize(protocol_factory, data[64:], tree_data)
return tree_data return tree_data