[vlc-commits] use pid for tmp file patterns
Francois Cartegnie
git at videolan.org
Thu Feb 20 00:46:13 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 20 00:32:41 2014 +0100| [73e62faf8b99a0da8b37e3d2c14d9b3083d75917] | committer: Francois Cartegnie
use pid for tmp file patterns
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73e62faf8b99a0da8b37e3d2c14d9b3083d75917
---
modules/misc/addons/fsstorage.c | 2 +-
src/playlist/loadsave.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/misc/addons/fsstorage.c b/modules/misc/addons/fsstorage.c
index 992211c..6db9077 100644
--- a/modules/misc/addons/fsstorage.c
+++ b/modules/misc/addons/fsstorage.c
@@ -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;
diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index 92ba806..f8298e7 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -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,
More information about the vlc-commits
mailing list