Skip to content

struct.error: unpack requires a buffer of 10 bytes #20

@chapmanjacobd

Description

@chapmanjacobd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions