[vlc-devel] commit: Use utf8_rename ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu May 7 18:13:49 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May  7 19:13:15 2009 +0300| [54aa64e826105f0c6ca7bb7b343f294ef08227e7] | committer: Rémi Denis-Courmont 

Use utf8_rename

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=54aa64e826105f0c6ca7bb7b343f294ef08227e7
---

 src/config/file.c   |    4 ++--
 src/modules/cache.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/config/file.c b/src/config/file.c
index 6acc176..0b2ba42 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -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
 
diff --git a/src/modules/cache.c b/src/modules/cache.c
index a43a6c3..2c190e0 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -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! */
 




More information about the vlc-devel mailing list