diff options
Diffstat (limited to 'src/Core/Banshee.Services/Banshee.Metadata')
-rw-r--r-- | src/Core/Banshee.Services/Banshee.Metadata/MetadataServiceJob.cs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/Core/Banshee.Services/Banshee.Metadata/MetadataServiceJob.cs b/src/Core/Banshee.Services/Banshee.Metadata/MetadataServiceJob.cs index b6e02f192..3ec68c9e5 100644 --- a/src/Core/Banshee.Services/Banshee.Metadata/MetadataServiceJob.cs +++ b/src/Core/Banshee.Services/Banshee.Metadata/MetadataServiceJob.cs @@ -139,20 +139,9 @@ namespace Banshee.Metadata return false; } - using(from_stream) { - long bytes_read = 0; - - using(FileStream to_stream = new FileStream(path, FileMode.Create, FileAccess.ReadWrite)) { - byte [] buffer = new byte[8192]; - int chunk_bytes_read = 0; - - while((chunk_bytes_read = from_stream.Read(buffer, 0, buffer.Length)) > 0) { - to_stream.Write(buffer, 0, chunk_bytes_read); - bytes_read += chunk_bytes_read; - } - } - } - + Banshee.IO.StreamAssist.Save (from_stream, new FileStream (path, + FileMode.Create, FileAccess.ReadWrite)); + return true; } |