]> git.sesse.net Git - vlc/commitdiff
Use utf8_rename
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 7 May 2009 16:13:15 +0000 (19:13 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 7 May 2009 16:13:15 +0000 (19:13 +0300)
src/config/file.c
src/modules/cache.c

index 6acc176cc02b029c075048b19dd282b8c4f1385e..0b2ba422c36e911c1dc1801d96b376d5b2a617f2 100644 (file)
@@ -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
 
index a43a6c37108c4491ebde9e2d7b1fbb0119d46ccb..2c190e0b6509cab8806a9a4899b54f13584e760b 100644 (file)
@@ -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! */