summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-10-10 07:56:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-10-10 07:56:38 +0200
commit554371eb27b02480de655723719c429085e24565 (patch)
tree47dba225681cc4df27b44012a3a19907472e367d /src
parent351670b5729a0f421338c4fee62faed6e8e20c63 (diff)
PhotoRec: fix destination path when creating image_remaining.dd
Diffstat (limited to 'src')
-rw-r--r--src/phrecn.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/phrecn.c b/src/phrecn.c
index b385e3b..cf4125b 100644
--- a/src/phrecn.c
+++ b/src/phrecn.c
@@ -1034,7 +1034,7 @@ int photorec(struct ph_param *params, const struct ph_options *options, alloc_da
data_size += current_search_space->end - current_search_space->start + 1;
}
snprintf(msg, sizeof(msg),
- "Create a image_remaining.dd (%u MB) file with the unknown data (Answer N if not sure) (Y/N)",
+ "Create an image_remaining.dd (%u MB) file with the unknown data (Answer N if not sure) (Y/N)",
(unsigned int)(data_size/1000/1000));
if(ask_confirmation("%s", msg)!=0)
{
@@ -1044,6 +1044,11 @@ int photorec(struct ph_param *params, const struct ph_options *options, alloc_da
res=strrchr(dst_path, '/');
if(res!=NULL)
*res='\0';
+ else
+ {
+ dst_path[0]='.';
+ dst_path[1]='\0';
+ }
filename=(char *)MALLOC(strlen(dst_path) + 1 + strlen(DEFAULT_IMAGE_NAME) + 1);
strcpy(filename, dst_path);
strcat(filename, "/");