Strategická: Realpath souboru
This commit is contained in:
parent
0fd1240953
commit
f98a172f9d
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue