Skip to content
Permalink
Browse files

fix #2017

  • Loading branch information
ralsina committed Jul 19, 2016
1 parent f47705f commit 7b47c275b3b5daaa03ca83307c2fd5d4dff4e0b9
Showing with 8 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +7 −0 nikola/plugins/command/check.py
@@ -16,6 +16,7 @@ Features
Bugfixes
--------

* Warn about possible outdated files after --clean-files (Issue #2017)
* Improved EXIF orientation handling
* Register post list template as a dependency (Issue #2391)
* Fix section color hashing when using Python 2
@@ -417,6 +417,8 @@ def clean_files(self):
self.logger.debug('removed: {0}'.format(f))
os.unlink(f)

warn_flag = bool(only_on_output)

# Find empty directories and remove them
output_folder = self.site.config['OUTPUT_FOLDER']
all_dirs = []
@@ -427,6 +429,11 @@ def clean_files(self):
try:
os.rmdir(d)
self.logger.debug('removed: {0}/'.format(d))
warn_flag = True
except OSError:
pass

if warn_flag:
self.logger.warn('Some files or directories have been removed, your site may need rebuilding')

return True

0 comments on commit 7b47c27

Please sign in to comment.