aboutsummaryrefslogtreecommitdiffstats
path: root/src/i_insert.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-11 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-11 20:20:20 +0200
commitbaab1fb89a3d41ba2fe36e6c68fe4a785788513a (patch)
tree09ec2bb0f373ebd4af92913e765b3ee3f3362db6 /src/i_insert.go
parentgo (diff)
downloadhardflip-baab1fb89a3d41ba2fe36e6c68fe4a785788513a.tar.gz
hardflip-baab1fb89a3d41ba2fe36e6c68fe4a785788513a.tar.bz2
hardflip-baab1fb89a3d41ba2fe36e6c68fe4a785788513a.tar.xz
hardflip-baab1fb89a3d41ba2fe36e6c68fe4a785788513a.tar.zst
hardflip-baab1fb89a3d41ba2fe36e6c68fe4a785788513a.zip
qwe
Diffstat (limited to 'src/i_insert.go')
-rw-r--r--src/i_insert.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/i_insert.go b/src/i_insert.go
index c425a11..f919049 100644
--- a/src/i_insert.go
+++ b/src/i_insert.go
@@ -53,6 +53,7 @@ package main
import (
"errors"
+ "fmt"
"os"
"regexp"
"strconv"
@@ -85,7 +86,25 @@ func i_insert_format_filename(name, path string) string {
return str
}
+func i_insert_abs_files(insert *HostNode) {
+ files := [3]*string{
+ &insert.Priv,
+ &insert.Jump.Priv,
+ &insert.RDPFile,
+ }
+
+ for _, v := range files {
+ if len(*v) > 0 {
+ tmp := *v
+ }
+ }
+}
+
func i_insert_host(data *HardData, insert *HostNode) {
+ i_insert_abs_files(insert)
+ data.ui.s.Fini()
+ fmt.Println(insert.RDPFile)
+ os.Exit(1)
filename := i_insert_format_filename(insert.Name,
data.data_dir + insert.parent.path())
insert.filename = filename