#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);
#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
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! */