Let data_directory take an existing pathclass instance.
This commit is contained in:
parent
a2fc49b6e7
commit
51b2642be9
1 changed files with 2 additions and 1 deletions
|
@ -1693,7 +1693,8 @@ class PhotoDB(
|
|||
else:
|
||||
data_directory = constants.DEFAULT_DATADIR
|
||||
|
||||
data_directory = helpers.remove_path_badchars(data_directory, allowed=':/\\')
|
||||
if isinstance(data_directory, str):
|
||||
data_directory = helpers.remove_path_badchars(data_directory, allowed=':/\\')
|
||||
self.data_directory = pathclass.Path(data_directory)
|
||||
|
||||
if self.data_directory.exists and not self.data_directory.is_dir:
|
||||
|
|
Loading…
Reference in a new issue