[gnome-music] albumArtCache: don't create media-cache folder if it already exists
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] albumArtCache: don't create media-cache folder if it already exists
- Date: Thu, 16 Oct 2014 23:15:46 +0000 (UTC)
commit 1d659d1eb00a15499cac86efb7ce83054946a306
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Fri Oct 17 00:54:03 2014 +0200
albumArtCache: don't create media-cache folder if it already exists
gnomemusic/albumArtCache.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 41a5a50..1177ffb 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -128,7 +128,8 @@ class AlbumArtCache:
def __init__(self):
try:
self.cacheDir = os.path.join(GLib.get_user_cache_dir(), 'media-art')
- Gio.file_new_for_path(self.cacheDir).make_directory(None)
+ if not os.path.exists(self.cacheDir):
+ Gio.file_new_for_path(self.cacheDir).make_directory(None)
except Exception as e:
logger.warn("Error: %s" % e)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]