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

Scan directories only #9

Open
gitqlt opened this issue Jun 26, 2019 · 2 comments
Open

Scan directories only #9

gitqlt opened this issue Jun 26, 2019 · 2 comments

Comments

@gitqlt
Copy link

gitqlt commented Jun 26, 2019

Besides -x mode (-x <directory>: extract all files to a directory) I suggest implementing a very similar scan functionality (the switch might be -X or something).
In this mode the program would walk through the entries similarly, but instead of extracting all the files, it would

  • print only the pure directory tree (names, cluster numbers)
  • create them as well, if the optional targetdir argument would exist (-X [directory]).

I think recovering the full directory-tree can be very useful in cases when only some of the directories contain important files. Also, with my damaged image, the extracting crashed in some folders, which prevented me to get the whole directory-tree in one stage.

@Gregwar
Copy link
Owner

Gregwar commented Jun 27, 2019

Hello,

Why not
But maybe we should investigate why it crashed as well to prevent this from happening

@gitqlt
Copy link
Author

gitqlt commented Jun 29, 2019

Hello, thank you for answering.

Regarding the crash, I found the followings with my damaged image.
(I have to keep that image private, sorry...).

I use fatcat v1.0.6.
It seems that when a subdirectory contain file(s) with no filename (and/or pointing to cluster 0), recovering them results in crash. Like here in the listings:

f 0/0/1980 00:00:00                                 c=0 s=2 (2B)

or:

Listing cluster 914
Directory cluster: 914
d 6/1/2019 00:14:20  ./                             c=914
d 6/1/2019 00:14:20  ../                            c=912
f 0/0/1980 02:00:00                                 c=0 s=0 (0B)
f 0/0/1980 00:00:00                                 c=0 s=0 (0B)

The recovery gives:

Extracting /Android/data/com.dropbox.android/files/.@ to
/var/tmp/resc/Android/data/com.dropbox.android/files/.@
bash: segmentation fault (core dumped)  fatcat /tmp/sdh.img -O 1048576 -x /var/tmp/resc

in gdb:
Program received signal SIGSEGV, Segmentation fault. _IO_new_fclose (fp=0x0) at iofclose.c:48 48 iofclose.c: No such file or directory. (gdb)

I hope that this helps you to fix. Anyway, this program is lifesaving! Thanks for it.

@gitqlt gitqlt changed the title scan directories only Scan directories only Jun 29, 2019
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

2 participants