[library-web] [htmlfiles] forcefully remove index.html if it has to be replaced



commit 04c330a8b6cab12d8a3202f99abde2169d13c729
Author: Frédéric Péters <fpeters 0d be>
Date:   Sun Aug 9 20:30:51 2009 +0200

    [htmlfiles] forcefully remove index.html if it has to be replaced

 src/modtypes/htmlfiles.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/modtypes/htmlfiles.py b/src/modtypes/htmlfiles.py
index 3790208..5017607 100644
--- a/src/modtypes/htmlfiles.py
+++ b/src/modtypes/htmlfiles.py
@@ -147,7 +147,7 @@ class HtmlFilesModule(DocModule):
 
         if self.index_filename:
             path = os.path.join(web_output_dir, 'index.html')
-            if os.path.islink(path):
+            if os.path.exists(path):
                 os.unlink(path)
             os.symlink(self.index_filename, path)
 



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