fixed incorrect path for resources
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b66309326c
commit
9dcf370a07
@ -1,8 +1,15 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from src.get_path_file import project_path
|
||||||
|
|
||||||
|
|
||||||
def get_path(lxc, path):
|
def get_path(lxc, path):
|
||||||
|
parent = os.path.join(project_path / "resources")
|
||||||
|
|
||||||
if path.startswith("/global/"):
|
if path.startswith("/global/"):
|
||||||
# Use global folder
|
# Use global folder
|
||||||
return "resources/scripts" + path[len("/global/"):]
|
return parent + "/scripts/" + path[len("/global/"):]
|
||||||
else:
|
else:
|
||||||
# Use VM/LXC folder
|
# Use VM/LXC folder
|
||||||
lxc_id = lxc.get_id()
|
lxc_id = lxc.get_id()
|
||||||
return f"resources/lxc/{lxc_id}/{path}"
|
return parent + f"/resources/lxc/{lxc_id}/{path}"
|
||||||
|
Loading…
Reference in New Issue
Block a user