Fix for -d option #1

Merged
merged 1 commit into from Jan 19, 2013

Conversation

Projects
None yet
3 participants
@mibe
Contributor

mibe commented Jan 19, 2013

I ran into the problem, that the -d option (e.g. recoverjpeg -d "%05d" test.img) was not working on my system (Debian & cygwin). I always got this error message: recoverjpeg: unable to create directory 00000 (17 (File exists)). That's because recoverjpeg wants to create the directory regardless whether it was already created before or not.

I've added a check in line 185; the directory is now created only when the directory does not exist.

This fixed the issue and recoverjpeg was able to recover over 195.000 files from an image of a broken hard disk :-)

I've tested the code on Debian 6.0.6 and cygwin 1.7.17 and it worked on both systems.

@buildhive

This comment has been minimized.

Show comment Hide comment
@buildhive

buildhive Jan 19, 2013

Samuel Tardieu » recoverjpeg #7 SUCCESS
This pull request looks good
(what's this?)

Samuel Tardieu » recoverjpeg #7 SUCCESS
This pull request looks good
(what's this?)

@samueltardieu samueltardieu merged commit 383ef6d into samueltardieu:master Jan 19, 2013

@samueltardieu

This comment has been minimized.

Show comment Hide comment
@samueltardieu

samueltardieu Jan 19, 2013

Owner

Thanks. I have released recoverjpeg 2.2.1 with a few fixes.

Owner

samueltardieu commented Jan 19, 2013

Thanks. I have released recoverjpeg 2.2.1 with a few fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment