~snicksie/banshee/fix-for-905260

« back to all changes in this revision

Viewing changes to src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseImportManager.cs

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-12 01:40:00 UTC
  • mfrom: (6.3.20 experimental)
  • Revision ID: package-import@ubuntu.com-20111212014000-0q4jsvif0oecyth8
Tags: 2.3.2-1ubuntu1
* Merge from Debian Experimental, remaining changes:
  + Enable and recommend SoundMenu and Disable NotificationArea by default
  + Disable boo and karma extensions
  + Enable and suggest u1ms
  + Move desktop file for Meego UI to /usr/share/une/applications
  + Change the url for the Amazon store redirector
  + [08dea2c] Revert "Fix invalid cast causing ftbfs with libgpod"

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
 
138
138
                OnImportResult (track, path, null);
139
139
            } catch (Exception e) {
140
 
                LogError (path, e);
 
140
                LogError (SafeUri.UriToFilename (path), e);
141
141
                UpdateProgress (null);
142
142
                OnImportResult (null, path, e);
143
143
            }
168
168
                return null;
169
169
            }
170
170
 
 
171
            if (Banshee.IO.File.GetSize (uri) == 0) {
 
172
                throw new InvalidFileException (String.Format (
 
173
                    Catalog.GetString ("File is empty so it could not be imported: {0}"),
 
174
                    Path.GetFileName (uri.LocalPath)));
 
175
            }
 
176
 
171
177
            DatabaseTrackInfo track = new DatabaseTrackInfo () { Uri = uri };
172
178
            using (var file = StreamTagger.ProcessUri (uri)) {
173
179
                StreamTagger.TrackInfoMerge (track, file, false, true);