* filegui.c (file_mask_dialog): Expand tilde. Remove redundant
ifs before g_free().
Этот коммит содержится в:
родитель
585edf1b51
Коммит
c5fd73d92b
@ -1,3 +1,8 @@
|
|||||||
|
2004-09-21 Leonard den Ottolander <leonard * den ottolander nl>
|
||||||
|
|
||||||
|
* filegui.c (file_mask_dialog): Expand tilde. Remove redundant
|
||||||
|
ifs before g_free().
|
||||||
|
|
||||||
2004-09-19 Roland Illig <roland.illig@gmx.de>
|
2004-09-19 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
* achown.c: Added const qualifiers and const_cast.
|
* achown.c: Added const qualifiers and const_cast.
|
||||||
@ -67,7 +72,7 @@
|
|||||||
* wtools.h (QuickWidget): Make text const.
|
* wtools.h (QuickWidget): Make text const.
|
||||||
* wtools.c (fg_input_dialog_help): Fix warning.
|
* wtools.c (fg_input_dialog_help): Fix warning.
|
||||||
|
|
||||||
2004-09-14 Leonard den Ottolander <leonard * den ottolander nl>
|
|
||||||
|
|
||||||
* utilunix.c (tilde_expand): Fix extra slash in result from
|
* utilunix.c (tilde_expand): Fix extra slash in result from
|
||||||
tilde_expand() for ~<user>/dir.
|
tilde_expand() for ~<user>/dir.
|
||||||
|
@ -852,7 +852,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text,
|
|||||||
const char *def_text, int only_one, int *do_background)
|
const char *def_text, int only_one, int *do_background)
|
||||||
{
|
{
|
||||||
int source_easy_patterns = easy_patterns;
|
int source_easy_patterns = easy_patterns;
|
||||||
char *source_mask, *orig_mask, *dest_dir;
|
char *source_mask, *orig_mask, *dest_dir, *tmpdest;
|
||||||
const char *error;
|
const char *error;
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
int val;
|
int val;
|
||||||
@ -914,8 +914,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text,
|
|||||||
|
|
||||||
orig_mask = source_mask;
|
orig_mask = source_mask;
|
||||||
if (!dest_dir || !*dest_dir) {
|
if (!dest_dir || !*dest_dir) {
|
||||||
if (source_mask)
|
g_free (source_mask);
|
||||||
g_free (source_mask);
|
|
||||||
return dest_dir;
|
return dest_dir;
|
||||||
}
|
}
|
||||||
if (source_easy_patterns) {
|
if (source_easy_patterns) {
|
||||||
@ -935,12 +934,15 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text,
|
|||||||
if (error) {
|
if (error) {
|
||||||
message (1, MSG_ERROR, _("Invalid source pattern `%s' \n %s "),
|
message (1, MSG_ERROR, _("Invalid source pattern `%s' \n %s "),
|
||||||
orig_mask, error);
|
orig_mask, error);
|
||||||
if (orig_mask)
|
g_free (orig_mask);
|
||||||
g_free (orig_mask);
|
|
||||||
goto ask_file_mask;
|
goto ask_file_mask;
|
||||||
}
|
}
|
||||||
if (orig_mask)
|
g_free (orig_mask);
|
||||||
g_free (orig_mask);
|
|
||||||
|
tmpdest = dest_dir;
|
||||||
|
dest_dir = tilde_expand(tmpdest);
|
||||||
|
g_free(tmpdest);
|
||||||
|
|
||||||
ctx->dest_mask = strrchr (dest_dir, PATH_SEP);
|
ctx->dest_mask = strrchr (dest_dir, PATH_SEP);
|
||||||
if (ctx->dest_mask == NULL)
|
if (ctx->dest_mask == NULL)
|
||||||
ctx->dest_mask = dest_dir;
|
ctx->dest_mask = dest_dir;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user