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,6 +1693,7 @@ class PhotoDB(
|
||||||
else:
|
else:
|
||||||
data_directory = constants.DEFAULT_DATADIR
|
data_directory = constants.DEFAULT_DATADIR
|
||||||
|
|
||||||
|
if isinstance(data_directory, str):
|
||||||
data_directory = helpers.remove_path_badchars(data_directory, allowed=':/\\')
|
data_directory = helpers.remove_path_badchars(data_directory, allowed=':/\\')
|
||||||
self.data_directory = pathclass.Path(data_directory)
|
self.data_directory = pathclass.Path(data_directory)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue