mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 06:53:27 +01:00
Added some documentation
This commit is contained in:
parent
6ad53e1466
commit
cd56286e86
2 changed files with 9 additions and 0 deletions
|
|
@ -60,6 +60,8 @@ class PathQuery(dbcore.FieldQuery):
|
|||
"""
|
||||
super(PathQuery, self).__init__(field, pattern, fast)
|
||||
|
||||
# By default, the case sensitivity depends on the filesystem
|
||||
# the library is located on.
|
||||
if case_sensitive is None:
|
||||
case_sensitive = beets.util.is_filesystem_case_sensitive(
|
||||
beets.config['directory'].get())
|
||||
|
|
|
|||
|
|
@ -762,6 +762,13 @@ def interactive_open(target, command=None):
|
|||
|
||||
|
||||
def is_filesystem_case_sensitive(path):
|
||||
"""Checks if the filesystem at the given path is case sensitive.
|
||||
If the path does not exist, a case sensitive file system is
|
||||
assumed if the system is not windows.
|
||||
|
||||
:param path: The path to check for case sensitivity.
|
||||
:return: True if the file system is case sensitive, False else.
|
||||
"""
|
||||
if os.path.exists(path):
|
||||
# Check if the path to the library exists in lower and upper case
|
||||
if os.path.exists(path.lower()) and \
|
||||
|
|
|
|||
Loading…
Reference in a new issue