Skip to content

Commit defdbbf

Browse files
committed
[__main__] refactor local file path checks to support remote files / URL strings
1 parent e830f17 commit defdbbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/fdiff/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ def run(argv):
8585
# File path argument validations
8686
# -------------------------------
8787

88-
if not file_exists(args.PREFILE):
88+
if not args.PREFILE.startswith("http") and not file_exists(args.PREFILE):
8989
sys.stderr.write(
9090
f"[*] ERROR: The file path '{args.PREFILE}' can not be found.{os.linesep}"
9191
)
9292
sys.exit(1)
93-
if not file_exists(args.POSTFILE):
93+
if not args.PREFILE.startswith("http") and not file_exists(args.POSTFILE):
9494
sys.stderr.write(
9595
f"[*] ERROR: The file path '{args.POSTFILE}' can not be found.{os.linesep}"
9696
)

0 commit comments

Comments
 (0)