summaryrefslogtreecommitdiffstats
path: root/src/askloc.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-05-24 16:57:03 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-05-24 16:57:03 +0200
commit7b5bf6bdfc8ffe6ea00779ee62fb72b6c498ab1a (patch)
tree47fbc6d31a36d5a34db9906e4abc10a88e7dda27 /src/askloc.c
parent9cd4ae3c156726b30868ae529439307ab890824f (diff)
If the destination is full, PhotoRec ask for a new location and it defaults
to the actual location instead of the default one.
Diffstat (limited to 'src/askloc.c')
-rw-r--r--src/askloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/askloc.c b/src/askloc.c
index 9d885b1..7f2f945 100644
--- a/src/askloc.c
+++ b/src/askloc.c
@@ -123,14 +123,17 @@ static void set_parent_directory(char *dst_directory)
#endif
}
-char *ask_location(const char*msg, const char *src_dir)
+char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
{
char dst_directory[4096];
char *res=NULL;
int quit;
WINDOW *window=newwin(0,0,0,0); /* full screen */
aff_copy(window);
- td_getcwd(dst_directory, sizeof(dst_directory));
+ if(dst_org != NULL)
+ strncpy(dst_directory, dst_org, sizeof(dst_directory));
+ else
+ td_getcwd(dst_directory, sizeof(dst_directory));
do
{
DIR* dir;