[vlc-commits] commit: scene: Windows cannot replace files atomically (fixes #3521) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Jul 14 22:12:04 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 14 23:11:28 2010 +0300| [c282137c7fb604fc9c5efbc9810c857316c15fac] | committer: Rémi Denis-Courmont 

scene: Windows cannot replace files atomically (fixes #3521)

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

 modules/video_filter/scene.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c
index a19454b..ae6d78a 100644
--- a/modules/video_filter/scene.c
+++ b/modules/video_filter/scene.c
@@ -319,6 +319,9 @@ static void SavePicture( filter_t *p_filter, picture_t *p_pic )
     else
     {
         /* switch to the final destination */
+#if defined (WIN32)
+        vlc_unlink( psz_filename );
+#endif
         i_ret = vlc_rename( psz_temp, psz_filename );
         if( i_ret == -1 )
         {



More information about the vlc-commits mailing list