[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:26:56 CEST 2010


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

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

(cherry picked from commit c282137c7fb604fc9c5efbc9810c857316c15fac)

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

 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