summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_file/ecore_file.c
diff options
context:
space:
mode:
authorChidambar Zinnoury <illogict@online.fr>2008-12-09 18:28:45 +0000
committerChidambar Zinnoury <illogict@online.fr>2008-12-09 18:28:45 +0000
commitc4525334f3d424e418a8e54b91af0f7cc5d1b664 (patch)
tree9bf9a1d8bba1cef0249f9b7b6969df813a4145a6 /legacy/ecore/src/lib/ecore_file/ecore_file.c
parentc8d86791e6e5c807d016661cfcf19da6f6582724 (diff)
Leak --: ecore_file_dir_get always returns a new buffer.
SVN revision: 38068
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c
index 1c9bcb6d09..a04ddc5f20 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -317,12 +317,14 @@ ecore_file_mv(const char *src, const char *dst)
317 stat(src, &st); 317 stat(src, &st);
318 if (S_ISREG(st.st_mode)) 318 if (S_ISREG(st.st_mode))
319 { 319 {
320 const char *dir;
321 dir = ecore_file_dir_get(dst);
320 // Since we can't directly rename, try to 322 // Since we can't directly rename, try to
321 // copy to temp file in the dst directory 323 // copy to temp file in the dst directory
322 // and then rename. 324 // and then rename.
323 snprintf(buf, sizeof(buf), "%s/.%s.tmp.XXXXXX", 325 snprintf(buf, sizeof(buf), "%s/.%s.tmp.XXXXXX",
324 ecore_file_dir_get(dst), 326 dir, ecore_file_file_get(dst));
325 ecore_file_file_get(dst)); 327 free(dir);
326 fd = mkstemp(buf); 328 fd = mkstemp(buf);
327 if (fd < 0) 329 if (fd < 0)
328 { 330 {