File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ func (h *Updemia) Render() string {
52
52
</div>
53
53
{{else}}
54
54
<div class="HelloBox center">
55
-
55
+ <form action="#">
56
56
<img src="http://www.updemia.com/images/logo.png" alt="" />
57
57
<h1>
58
58
Hello, you
@@ -70,6 +70,7 @@ func (h *Updemia) Render() string {
70
70
onkeyup="Passphrase" required="required" />
71
71
72
72
<input type="submit" value="Start" class="btn" onclick="OnUserLog" />
73
+ </form>
73
74
</div>
74
75
{{end}}
75
76
</div>
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ import (
6
6
"fmt"
7
7
"github.com/atotto/clipboard"
8
8
"github.com/howeyc/fsnotify"
9
+ "github.com/mitchellh/go-homedir"
9
10
"io"
10
11
"io/ioutil"
11
12
"log"
12
13
"mime/multipart"
13
14
"net/http"
14
15
"os"
15
- "os/user"
16
16
"path/filepath"
17
17
"strings"
18
18
)
@@ -61,14 +61,14 @@ func watchUploadFolder() {
61
61
}
62
62
63
63
func getDestinationPath () string {
64
- usr , err := user . Current ()
64
+ usrDir , err := homedir . Dir ()
65
65
if err != nil {
66
66
log .Fatal (err )
67
67
}
68
68
69
69
var destination_path bytes.Buffer
70
70
71
- destination_path .WriteString (usr . HomeDir )
71
+ destination_path .WriteString (usrDir )
72
72
destination_path .WriteString (defaultDestinationPath )
73
73
74
74
os .MkdirAll (destination_path .String (), os .ModePerm )
You can’t perform that action at this time.
0 commit comments