permissions: Use correct path conversions

It looks like the original author mistook `bytestring_path` for `syspath`.
This commit is contained in:
Adrian Sampson 2016-06-28 10:31:57 -07:00
parent e33c19a3e9
commit b099503a6c

View file

@ -75,10 +75,10 @@ class Permissions(BeetsPlugin):
for path in file_chmod_queue:
# Changing permissions on the destination file.
os.chmod(util.bytestring_path(path), file_perm)
os.chmod(util.syspath(path), file_perm)
# Checks if the destination path has the permissions configured.
if not check_permissions(util.bytestring_path(path), file_perm):
if not check_permissions(util.syspath(path), file_perm):
self._log.warn(
u'There was a problem setting permissions on file {}',
path,
@ -92,10 +92,10 @@ class Permissions(BeetsPlugin):
# Change permissions for the directories.
for path in dir_chmod_queue:
# Chaning permissions on the destination directory.
os.chmod(util.bytestring_path(path), dir_perm)
os.chmod(util.syspath(path), dir_perm)
# Checks if the destination path has the permissions configured.
if not check_permissions(util.bytestring_path(path), dir_perm):
if not check_permissions(util.syspath(path), dir_perm):
self._log.warn(
u'There was a problem setting permissions on directory {}',
path,