diff --git a/zerver/management/commands/export_single_user.py b/zerver/management/commands/export_single_user.py index 87851a0803..25fca88e3b 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...",