Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jul 19, 2016
2 parents 47d1bff + 1f4462f commit f46d73c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -18,6 +18,7 @@ Bugfixes
--------

* Some images were copied ignoring the PRESERVE_EXIF_DATA option
* 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
Expand Down
7 changes: 7 additions & 0 deletions nikola/plugins/command/check.py
Expand Up @@ -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 = []
Expand All @@ -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 f46d73c

Please sign in to comment.