]> git.sesse.net Git - vlc/commitdiff
use pid for tmp file patterns
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 19 Feb 2014 23:32:41 +0000 (00:32 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 19 Feb 2014 23:34:16 +0000 (00:34 +0100)
modules/misc/addons/fsstorage.c
src/playlist/loadsave.c

index 992211c4ca1b303e81d16ae821d27c64370422c8..6db9077d11180a2861f1ad05e7247115266f2bc3 100644 (file)
@@ -539,7 +539,7 @@ static int WriteCatalog( addons_storage_t *p_storage,
     }
     free( psz_userdir );
 
-    if ( asprintf( &psz_file_tmp, "%s.tmp", psz_file ) < 1 )
+    if ( asprintf( &psz_file_tmp, "%s.tmp%"PRIu32, psz_file, (uint32_t)getpid() ) < 1 )
     {
         free( psz_file );
         return VLC_ENOMEM;
index 92ba806318a5747fcd3db050fac977fe3489dce7..f8298e737c981a2d21d4e2f6c81a7fc57ab3b119 100644 (file)
@@ -202,7 +202,7 @@ int playlist_MLDump( playlist_t *p_playlist )
 
     strcat( psz_dirname, DIR_SEP "ml.xspf" );
 
-    if ( asprintf( &psz_temp, "%s.tmp", psz_dirname ) < 1 )
+    if ( asprintf( &psz_temp, "%s.tmp%"PRIu32, psz_dirname, (uint32_t)getpid() ) < 1 )
         return VLC_EGENERIC;
 
     int i_ret = playlist_Export( p_playlist, psz_temp, p_playlist->p_media_library,