[rhythmbox: 3/4] magnatune: replace existing files from zip archive extraction



commit 6d3c0e60539488e952a4a304e56d49ec0df236c0
Author: crvi <crvisqr gmail com>
Date:   Mon Jan 27 14:48:17 2020 +0530

    magnatune: replace existing files from zip archive extraction
    
    Fixes: #1764

 plugins/magnatune/MagnatuneSource.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/magnatune/MagnatuneSource.py b/plugins/magnatune/MagnatuneSource.py
index 89601915c..cf3fb2c90 100644
--- a/plugins/magnatune/MagnatuneSource.py
+++ b/plugins/magnatune/MagnatuneSource.py
@@ -465,7 +465,7 @@ class MagnatuneSource(RB.BrowserSource):
                                track_uri = RB.sanitize_uri_for_filesystem(track_uri)
                                RB.uri_create_parent_dirs(track_uri)
 
-                               track_out = Gio.file_new_for_uri(track_uri).create(Gio.FileCreateFlags.NONE, 
None)
+                               track_out = Gio.file_new_for_uri(track_uri).replace(None, False, 
Gio.FileCreateFlags.NONE, None)
                                if track_out is not None:
                                        track_out.write(album.read(track), None)
                                        track_out.close(None)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]