Changeset 746:003c2d428dd8 in hatta-dev for hatta.py


Ignore:
Timestamp:
01/24/10 15:31:54 (2 years ago)
Author:
sheep@…
Branch:
default
Message:

remove empty subdirectories after page delete

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hatta.py

    r745 r746  
    708708                                                       author, comment, parent) 
    709709 
     710    def delete_page(self, title, author=u'', comment=u''): 
     711        super(WikiSubdirectoryStorage, self).delete_page(title, author, comment) 
     712        file_path = self._file_path(title) 
     713        self._check_path(file_path) 
     714        dir_path = os.path.dirname(file_path) 
     715        os.removedirs(dir_path) 
    710716 
    711717class WikiParser(object): 
Note: See TracChangeset for help on using the changeset viewer.