Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

export_single_user: Fix usage with relative --output directory.

Anders Kaseorg6855df0abbcd
diff --git a/zerver/management/commands/export_single_user.py b/zerver/management/commands/export_single_user.py
index 87851a08037..25fca88e3b4 100644
--- a/zerver/management/commands/export_single_user.py
+++ b/zerver/management/commands/export_single_user.py
@@ -34,6 +34,7 @@ class Command(ZulipBaseCommand):
if output_dir is None:
output_dir = tempfile.mkdtemp(prefix="zulip-export-")
else:
+ output_dir = os.path.abspath(output_dir)
if os.path.exists(output_dir) and os.listdir(output_dir):
raise CommandError(
f"Refusing to overwrite nonempty directory: {output_dir}. Aborting...",