Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly clean up temporary files on importer error #37

Open
ZetaTwo opened this issue Apr 3, 2023 · 0 comments
Open

Properly clean up temporary files on importer error #37

ZetaTwo opened this issue Apr 3, 2023 · 0 comments

Comments

@ZetaTwo
Copy link
Contributor

ZetaTwo commented Apr 3, 2023

Apr 03 13:30:00 hashr2 bash[1362]: I0403 13:30:00.043981    1362 hashr.go:200] Preprocessing linux-tools-4.15.0-106-generic_4.15.0-106.107_amd64.deb
Apr 03 13:30:00 hashr2 bash[1362]: I0403 13:30:00.044380    1362 common.go:142] Copying linux-tools-4.15.0-106-generic_4.15.0-106.107_amd64.deb to /tmp/hashr-linux-tools-4.15.0-106-generic_4.15.0-106.107_amd64.deb-309297636/linux-tools-4.15.0-106-generic_4.15.0-106.107_amd64.deb
Apr 03 13:30:00 hashr2 bash[1362]: E0403 13:30:00.045723    1362 hashr.go:308] deb: skipping source linux-tools-4.15.0-101-generic_4.15.0-101.102_amd64.deb: error while preprocessing: error while opening tar archive in deb package: xz: data is truncated or corrupt
Apr 03 13:30:00 hashr2 bash[1362]: I0403 13:30:00.046763    1362 hashr.go:233] Deleting

The "Deleting" log line is missing a path

glog.Infof("Deleting %s", path)
which is probably also why the removal never happens. This could have been dangerous as well considering the command below is "sudo rm -rf ".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant