From dc6cf0b6fab1b3b013950ed418a9aeacec55681d Mon Sep 17 00:00:00 2001
From: Ilia Maslakov <il.smind@gmail.com>
Date: Mon, 15 Jun 2009 20:48:42 +0000
Subject: [PATCH] Ticket #305 (dont work rename/copy on some chars)
fix: incorrect work rename/copy
---
src/file.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/file.c b/src/file.c
index e453fe2..24b15ca 100644
a
|
b
|
transform_source (FileOpContext *ctx, const char *source) |
153 | 153 | char *s = g_strdup (source); |
154 | 154 | char *q; |
155 | 155 | const char *fnsource = x_basename (s); |
156 | | size_t j=0, len; |
| 156 | char *fnsource_fixed = g_strdup (fnsource); |
157 | 157 | |
158 | 158 | /* We remove \n from the filename since regex routines would use \n as an anchor */ |
159 | 159 | /* this is just to be allowed to maniupulate file names with \n on it */ |
… |
… |
transform_source (FileOpContext *ctx, const char *source) |
163 | 163 | } |
164 | 164 | |
165 | 165 | str_fix_string (fnsource); |
166 | | len = strlen (fnsource); |
167 | 166 | |
168 | | if ( !( mc_search_run(ctx->search_handle, fnsource, 0, len, &j) && j == len) ){ |
| 167 | if ( ! mc_search_run(ctx->search_handle, fnsource_fixed, 0, strlen(fnsource_fixed), NULL) ){ |
169 | 168 | transform_error = FILE_SKIP; |
170 | 169 | g_free (s); |
171 | 170 | return NULL; |