[library-web] alternatively use index.html for timestamp if .devhelp2 file is not available



commit 39acb5a201e491cf4f770bc9d9f2b8b5c49cdffc
Author: Frédéric Péters <fpeters 0d be>
Date:   Tue Jan 28 19:18:48 2014 +0000

    alternatively use index.html for timestamp if .devhelp2 file is not available

 src/modtypes/gtkdoc.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/modtypes/gtkdoc.py b/src/modtypes/gtkdoc.py
index addba70..5cb2a99 100644
--- a/src/modtypes/gtkdoc.py
+++ b/src/modtypes/gtkdoc.py
@@ -65,11 +65,11 @@ class GtkDocModule(DocModule):
         if not os.path.exists(web_output_dir):
             os.makedirs(web_output_dir)
 
-        if not app.rebuild_all and os.path.exists(
-                os.path.join(web_output_dir, '%s.devhelp2' % doc_module)):
-            mtime = os.stat(os.path.join(web_output_dir, '%s.devhelp2' % doc_module))[stat.ST_MTIME]
-        else:
-            mtime = 0
+        mtime = 0
+        if not app.rebuild_all:
+            for filename in ('%s.devhelp2' % doc_module, 'index.html'):
+                if os.path.exists(os.path.join(web_output_dir, filename)):
+                    mtime = os.stat(os.path.join(web_output_dir, filename))[stat.ST_MTIME]
 
         if mtime > max(self.mtime_tarball, self.mtime_xslt_files):
             logging.debug('using already generated doc')


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