summaryrefslogtreecommitdiffstats
path: root/src/intrf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-09-10 17:43:59 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-09-10 17:43:59 +0200
commit1fc05a46d8cbcc4e0187920fb3015aa339e051a3 (patch)
treeb034ea83150d8f0c55ecc33162d2936c9a10aafb /src/intrf.c
parent2883f87173707724bea30d523938d95c15692235 (diff)
Create the partition image in the current directory when "/cmd device advanced,copy" is used
Diffstat (limited to 'src/intrf.c')
-rw-r--r--src/intrf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/intrf.c b/src/intrf.c
index 1b953b6..39aeb4d 100644
--- a/src/intrf.c
+++ b/src/intrf.c
@@ -288,6 +288,13 @@ static inline char *td_getcwd(char *buf, unsigned long size)
return buf;
}
+char *get_default_location(void)
+{
+ char dst_directory[4096];
+ td_getcwd(dst_directory, sizeof(dst_directory));
+ return strdup(dst_directory);
+}
+
#ifdef HAVE_NCURSES
#define INTER_DIR (LINES-25+16)
static int vaff_txt(int line, WINDOW *window, const char *_format, va_list ap) __attribute__((format(printf, 3, 0)));
@@ -1926,9 +1933,7 @@ int ask_confirmation(const char*_format, ...)
char *ask_location(const char*msg, const char *src_dir)
{
- char dst_directory[4096];
- td_getcwd(dst_directory, sizeof(dst_directory));
- return strdup(dst_directory);
+ return get_default_location();
}
#endif