forked from enlightenment/efl
Leak --: ecore_file_dir_get always returns a new buffer.
SVN revision: 38068
This commit is contained in:
parent
c8d86791e6
commit
c4525334f3
|
@ -317,12 +317,14 @@ ecore_file_mv(const char *src, const char *dst)
|
|||
stat(src, &st);
|
||||
if (S_ISREG(st.st_mode))
|
||||
{
|
||||
const char *dir;
|
||||
dir = ecore_file_dir_get(dst);
|
||||
// Since we can't directly rename, try to
|
||||
// copy to temp file in the dst directory
|
||||
// and then rename.
|
||||
snprintf(buf, sizeof(buf), "%s/.%s.tmp.XXXXXX",
|
||||
ecore_file_dir_get(dst),
|
||||
ecore_file_file_get(dst));
|
||||
dir, ecore_file_file_get(dst));
|
||||
free(dir);
|
||||
fd = mkstemp(buf);
|
||||
if (fd < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue