From 59e54d1792a1c2cc06c669c7a90305d2fe5c6abd Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 22 Feb 2016 00:02:58 -0800 Subject: [PATCH] Fix #1891: Missing `syspath` in `beet stats -e` --- beets/ui/commands.py | 2 +- docs/changelog.rst | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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)