support directory in export_path

This commit is contained in:
Dima Gerasimov 2019-11-07 20:48:58 +00:00
parent a6d16b9c55
commit 16b8878717

View file

@ -24,7 +24,11 @@ def _get_export() -> Path:
# fallback to my_configuration
from . import paths
export_path = paths.twitter.export_path
return Path(export_path)
p = Path(export_path)
if p.is_dir():
return max(p.glob('*.zip'))
else:
return p