File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,20 @@ func GetServerWGConf() (models.IntClient, error) {
3333func InstallNetclient () error {
3434
3535 netclientPath := ncutils .GetNetclientPath ()
36+ if ncutils .IsWindows () {
37+ netclientPath += "\\ "
38+ } else {
39+ netclientPath += "/"
40+ }
3641 if ! FileExists (netclientPath + "netclient" ) {
3742 var err error
3843 if ncutils .IsWindows () {
39- _ , err = copy (".\\ netclient\\ netclient" , netclientPath + "\\ netclient" )
44+ _ , err = copy (".\\ netclient\\ netclient" , netclientPath + "netclient" )
4045 } else {
41- _ , err = copy ("./netclient/netclient" , netclientPath + "/ netclient" )
46+ _ , err = copy ("./netclient/netclient" , netclientPath + "netclient" )
4247 }
4348 if err != nil {
44- log .Println ("could not create " + netclientPath + "/ netclient" )
49+ log .Println ("could not create " + netclientPath + "netclient" )
4550 return err
4651 }
4752 }
@@ -102,7 +107,7 @@ func RemoveNetwork(network string) (bool, error) {
102107
103108func InitServerNetclient () error {
104109 netclientDir := ncutils .GetNetclientPath ()
105- _ , err := os .Stat (netclientDir + "/config" )
110+ _ , err := os .Stat (netclientDir + "/config" )
106111 if os .IsNotExist (err ) {
107112 os .MkdirAll (netclientDir + "/config" , 744 )
108113 } else if err != nil {
You can’t perform that action at this time.
0 commit comments