Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.

fix: web端输入本地目录提示url不合法 #1374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cobra/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def post():
if isinstance(target, list):
for t in target:
# Scan
if re.match(r'http://|https://', t):
if re.match(r'http://|https://', t) or os.path.exists(t):
arg = (t, formatter, output, rule, a_sid, is_del)
producer(task=arg)

Expand All @@ -124,7 +124,7 @@ def post():
'total_target_num': len(target),
}
else:
if re.match(r'http://|https://', target):
if re.match(r'http://|https://', target) or os.path.exists(target):
arg = (target, formatter, output, rule, a_sid, is_del)
producer(task=arg)

Expand Down