Let data_directory take an existing pathclass instance.

This commit is contained in:
voussoir 2020-09-27 10:45:58 -07:00
parent a2fc49b6e7
commit 51b2642be9

View file

@ -1693,6 +1693,7 @@ class PhotoDB(
else:
data_directory = constants.DEFAULT_DATADIR
if isinstance(data_directory, str):
data_directory = helpers.remove_path_badchars(data_directory, allowed=':/\\')
self.data_directory = pathclass.Path(data_directory)