diff --git a/beets/ui/commands.py b/beets/ui/commands.py index bc57a5431..641b1186f 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -1257,7 +1257,7 @@ def show_stats(lib, query, exact): for item in items: if exact: try: - total_size += os.path.getsize(item.path) + total_size += os.path.getsize(syspath(item.path)) except OSError as exc: log.info('could not get size of {}: {}', item.path, exc) else: diff --git a/docs/changelog.rst b/docs/changelog.rst index df54089f2..3803894b2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,7 +4,10 @@ Changelog 1.3.18 (in development) ----------------------- -Changelog goes here! +Fixes: + +* Fix a problem with the :ref:`stats-cmd` in exact mode when filenames on + Windows use non-ASCII characters. :bug:`1891` 1.3.17 (February 7, 2016)