btrfs-snapshots-diff icon indicating copy to clipboard operation
btrfs-snapshots-diff copied to clipboard

struct.error: unpack requires a buffer of 10 bytes

Open chapmanjacobd opened this issue 3 years ago • 0 comments

la orana,

when passing a file that is not done yet, it might be nice to have a user-friendly message

sudo btrfs send --no-data -p ~/d/.snapshots/one/ /mnt/d/.snapshots/two/ > diff  & # still running...

sudo ./bin/btrfs-snapshots-diff.py --by_path -t -f diff
Traceback (most recent call last):
  File "./bin/btrfs-snapshots-diff.py", line 653, in <module>
    main()
  File "./bin/btrfs-snapshots-diff.py", line 620, in main
    commands, paths = stream.decode(bogus=args.bogus)
  File "./bin/btrfs-snapshots-diff.py", line 152, in decode
    l_cmd, cmd, _ = unpack('<IHI', self.stream[offset : offset + self.l_head])
struct.error: unpack requires a buffer of 10 bytes

maybe this could be:

if  (fuser diff):
	It looks like the file you referenced is still being saved
else:
	It looks like the file you referenced is corrupt

chapmanjacobd avatar May 02 '22 20:05 chapmanjacobd