From 3aefd6a19bf316bc7829658eecb3e01c2509982d Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 11 Jan 2012 16:02:24 +0100 Subject: When creating indicator-sound's cache directory, use DirUtils.create_with_parents() instead of DirUtils.create(). Rationale described @ https://bugs.launchpad.net/indicator-sound/+bug/799383 --- src/metadata-menu-item.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala index 623aaf5..a7cbf46 100644 --- a/src/metadata-menu-item.vala +++ b/src/metadata-menu-item.vala @@ -62,8 +62,8 @@ public class MetadataMenuitem : PlayerItem private static string? create_album_art_temp_dir() { string path = GLib.Path.build_filename(Environment.get_user_cache_dir(), ALBUM_ART_DIR_SUFFIX); - if(DirUtils.create(path, 0700) == -1){ - warning("could not create a temp dir for remote album art, it must have been created already"); + if(DirUtils.create_with_parents(path, 0700) == -1){ + warning("could not create temp dir %s for remote album art, it must have been created already", path); } return path; } -- cgit v1.2.3 From 5f5d88054374dc00a0c28f9c91c849d70113e6ee Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 11 Jan 2012 17:11:32 +0100 Subject: fix minor runtime warning. The debug call in delete_album_art_contents() generates a runtime warning if the directory is empty. Moving the debug call to come after the "file == null" test silences the warning. --- src/metadata-menu-item.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala index a7cbf46..42f9667 100644 --- a/src/metadata-menu-item.vala +++ b/src/metadata-menu-item.vala @@ -78,12 +78,12 @@ public class MetadataMenuitem : PlayerItem while (true) { var file = e.next_file (null); - - debug("file name = %s", file.get_name()); if (file == null) break; + debug("file name = %s", file.get_name()); + var child = dir.get_child (file.get_name ()); try { -- cgit v1.2.3