Strategická: Realpath souboru

This commit is contained in:
David Klement 2022-09-20 17:17:20 +02:00
parent 0fd1240953
commit f98a172f9d

View file

@ -2,6 +2,7 @@
import argparse import argparse
import json import json
import logging import logging
import os
import requests import requests
import shutil import shutil
import sys import sys
@ -63,7 +64,7 @@ def get_command(args) -> List[str]:
logger.error("Program not specified.") logger.error("Program not specified.")
sys.exit(1) sys.exit(1)
program = args.program program = os.path.realpath(args.program)
if args.copy: if args.copy:
program = tempfile.mktemp() program = tempfile.mktemp()
shutil.copyfile(args.program, program) shutil.copyfile(args.program, program)