Browse Source

Fixed issue with profile name vs profile path

Signed-off-by: gryffyn <me@evan.mp>
master v0.1.1
Evan Penner 12 months ago
committed by gryffyn
parent
commit
ffdc54e9b8
  1. 1
      .gitignore
  2. 4
      netctl-obfuscate.go

1
.gitignore

@ -1,2 +1,3 @@
.idea/
netctl-obfuscate
bin/

4
netctl-obfuscate.go

@ -31,7 +31,9 @@ func checkUser() {
}
}
func getPath(netctlFile string) (fullpath string) {
func getPath(inputstr string) (fullpath string) {
tempfile := strings.Split(inputstr, "/")
netctlFile := tempfile[len(tempfile)-1]
fullpath = filepath.Join("/etc/netctl/", netctlFile)
if _, err := os.Stat(fullpath); os.IsNotExist(err) {
check(err)

Loading…
Cancel
Save