Skip to content

Commit a88f11c

Browse files
committed
fix: apply --max-document-size for directory imports too
1 parent a6d8978 commit a88f11c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rethinkdb/_import.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,10 +1085,6 @@ def parse_options(argv, prog=None):
10851085
if options.custom_header is not None:
10861086
parser.error("--custom-header option is not valid for json files")
10871087

1088-
if options.max_document_size > 0:
1089-
global JSON_MAX_BUFFER_SIZE
1090-
JSON_MAX_BUFFER_SIZE = options.max_document_size
1091-
10921088
options.file = os.path.abspath(options.file)
10931089

10941090
else:
@@ -1099,6 +1095,11 @@ def parse_options(argv, prog=None):
10991095

11001096
# --
11011097

1098+
# max_document_size - json
1099+
if options.max_document_size > 0:
1100+
global JSON_MAX_BUFFER_SIZE
1101+
JSON_MAX_BUFFER_SIZE = options.max_document_size
1102+
11021103
# max_nesting_depth
11031104
if options.max_nesting_depth > 0:
11041105
global MAX_NESTING_DEPTH

0 commit comments

Comments
 (0)