Details
-
Type:
Bug
-
Status: Done
-
Priority:
(None)
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
Description
The mender-artifact "modify" command deletes the file "mender_test.img" if it is in the same directory as the artifact being modified. This can cause unexpected loss of data. Example:
$ dir
total 520K
rw-rr- 1 don don 512K Sep 27 14:57 mender_test.img
rw-rr- 1 don don 7.0K Sep 27 14:58 x.mender
$ mender-artifact modify -n octopus x.mender
$ dir
total 8.0K
rw------ 1 don don 7.0K Sep 27 15:08 x.mender
I suspect the file is deleted because it has the same name as the embedded image file, and was overwritten for temporary usage during the modify operation.