[library-web] create storage directory on runtime



commit c674be97d7661c6869e26b52a650fb40bee4e95d
Author: Frederic Peters <fpeters 0d be>
Date:   Thu Apr 23 07:59:28 2009 +0200

    create storage directory on runtime
    
    Library depended on the existence of data/externals/ to store some downloaded
    files, but this empty directory was removed during the Git migration.
---
 src/lgo.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/lgo.py b/src/lgo.py
index 2acfd67..a052e56 100755
--- a/src/lgo.py
+++ b/src/lgo.py
@@ -1502,6 +1502,9 @@ class Lgo:
         scrollkeeper_xml = os.path.join(data_dir, 'externals', 'scrollkeeper.xml')
         toc_xml = os.path.join(data_dir, 'externals', 'toc.xml')
 
+        if not os.path.exists(os.path.join(data_dir, 'externals')):
+            os.mkdir(os.path.join(data_dir, 'externals'))
+
         if not os.path.exists(scrollkeeper_xml) or not os.path.exists(toc_xml):
             filename = FtpDotGnomeDotOrg(self.config).download(
                     'pub/GNOME/sources/yelp/2.22/yelp-2.22.0.tar.bz2')[0]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]