Mercurial > geeqie
changeset 931:a53f5141228b
allow only existing folders in destination dialog
http://sourceforge.net/tracker/index.php?func=detail&aid=2011243&group_id=222125&atid=1054680
author | nadvornik |
---|---|
date | Sat, 26 Jul 2008 18:17:56 +0000 |
parents | c87e9835c443 |
children | 988eff509920 |
files | src/typedefs.h src/utilops.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/typedefs.h Sat Jul 26 10:27:41 2008 +0000 +++ b/src/typedefs.h Sat Jul 26 18:17:56 2008 +0000 @@ -161,7 +161,8 @@ CHANGE_NO_WRITE_PERM_DEST_DIR = 1 << 6, CHANGE_NO_WRITE_PERM_DEST = 1 << 7, CHANGE_DEST_EXISTS = 1 << 8, - CHANGE_NO_SRC = 1 << 9 + CHANGE_NO_SRC = 1 << 9, + CHANGE_GENERIC_ERROR = 1 << 16 } ChangeError; #define MAX_SPLIT_IMAGES 4
--- a/src/utilops.c Sat Jul 26 10:27:41 2008 +0000 +++ b/src/utilops.c Sat Jul 26 18:17:56 2008 +0000 @@ -866,7 +866,12 @@ gint error = CHANGE_OK; gchar *desc = NULL; - if (ud->dir_fd) + if (ud->dest_path && !isdir(ud->dest_path)) + { + error = CHANGE_GENERIC_ERROR; + desc = g_strdup_printf(_("%s is not a directory"), ud->dest_path); + } + else if (ud->dir_fd) { error = file_data_sc_verify_ci(ud->dir_fd); if (error) desc = file_data_get_error_string(error); @@ -883,7 +888,6 @@ return; } - // FIXME: the dialogs needs better error messages with a list of files and error descriptions if (!(error & CHANGE_ERROR_MASK)) { /* just a warning */