fatcat icon indicating copy to clipboard operation
fatcat copied to clipboard

Verify target directory / file when extracting

Open gitqlt opened this issue 6 years ago • 2 comments

When extracting, the program crashes when the target directory specified does not exist

fatcat /tmp/sdh.img -O 1048576 -x /tmp/NoDir
Extracting /LOST.DIR/132 to NoDir/LOST.DIR/132
.        dHyNyNHyN�..       dHyNyNHyN�Segmentation fault (core dumped)

In normal cases the target directory exists and the recovery process starts working. However, we may run out of disk space, in which case the program silently creates the output files with zero length.

gitqlt avatar Jun 29 '19 09:06 gitqlt

Ok so this issue is related to the fact that you extract to a target where there is no space remaining ?

Gregwar avatar Jun 30 '19 00:06 Gregwar

Not really.

At the beginning, the target filesystem has a few GB of free space. Here I create the targetdir and then start the -x targetdir recovery process. When the file system becomes full, the remaining files are created with zero length.

gitqlt avatar Jun 30 '19 23:06 gitqlt