summaryrefslogtreecommitdiff
path: root/src/CueSheets/Banshee.CueSheets/CueSheet.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CueSheets/Banshee.CueSheets/CueSheet.cs')
-rw-r--r--src/CueSheets/Banshee.CueSheets/CueSheet.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/CueSheets/Banshee.CueSheets/CueSheet.cs b/src/CueSheets/Banshee.CueSheets/CueSheet.cs
index d822c8f..3c7b2b2 100644
--- a/src/CueSheets/Banshee.CueSheets/CueSheet.cs
+++ b/src/CueSheets/Banshee.CueSheets/CueSheet.cs
@@ -141,7 +141,7 @@ namespace Banshee.CueSheets
if (File.Exists (_img_full_path)) {
string aaid=CoverArtSpec.CreateArtistAlbumId (_performer,_title);
string path=CoverArtSpec.GetPathForNewFile(aaid,_img_full_path);
- File.Delete (path);
+ if (File.Exists (path)) { File.Delete (path); }
File.Copy (_img_full_path,path);
int i,N;
for(i=0,N=nEntries ();i<N;i++) {
@@ -160,6 +160,14 @@ namespace Banshee.CueSheets
File.Copy (_img_full_path,path);
}
}
+ } else {
+ if (File.Exists (_img_full_path)) {
+ string path=CoverArtSpec.GetPathForNewFile (aaid,_img_full_path);
+ if (File.Exists (path)) { File.Delete (path); }
+ if (!File.Exists (path)) {
+ File.Copy (_img_full_path,path);
+ }
+ }
}
return aaid;
}