Commit 54aa64e8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use utf8_rename

parent 353cd0a0
......@@ -674,7 +674,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
#ifndef WIN32
fdatasync (fd); /* Flush from OS */
/* Atomically replace the file... */
rename (temporary, permanent);
utf8_rename (temporary, permanent);
/* (...then synchronize the directory, err, TODO...) */
/* ...and finally close the file */
vlc_mutex_unlock (&lock);
......@@ -683,7 +683,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
#ifdef WIN32
/* Windows cannot remove open files nor overwrite existing ones */
utf8_unlink (permanent);
rename (temporary, permanent);
utf8_rename (temporary, permanent);
vlc_mutex_unlock (&lock);
#endif
......
......@@ -605,12 +605,12 @@ void CacheSave( vlc_object_t *p_this, module_bank_t *p_bank )
goto error;
#ifndef WIN32
rename (psz_tmpname, psz_filename); /* atomically replace old cache */
utf8_rename (psz_tmpname, psz_filename); /* atomically replace old cache */
fclose (file);
#else
utf8_unlink (psz_filename);
fclose (file);
rename (psz_tmpname, psz_filename);
utf8_rename (psz_tmpname, psz_filename);
#endif
return; /* success! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment