Gregwar/fatcat

Verify target directory / file when extracting

gitqlt opened this issue · 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
.        �dH�yNyNH�yN�..       �dH�yNyNH�yN��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.

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

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.