Comment 1 for bug 158419

Revision history for this message
Pepijn van de Geer (pvandegeer) wrote :

This seems to be fixed as the current code of the stable branch looks like this:

        private void DeleteSong(TrackInfo ti)
        {
            File.Delete(ti.Uri.LocalPath);

            // trim empty parent directories
            try {
                string old_dir = Path.GetDirectoryName(ti.Uri.LocalPath);
                while(old_dir != null && old_dir != String.Empty) {
                    Directory.Delete(old_dir);
                    old_dir = Path.GetDirectoryName(old_dir);
                }
            } catch(Exception) {}
        }