Skip to content

Commit

Permalink
Merge pull request #32 from Equanox/copy-fix
Browse files Browse the repository at this point in the history
Fixed bad reference to copy lib
  • Loading branch information
Equanox authored Mar 6, 2019
2 parents 2bc5abf + 47f3cb2 commit ce7e030
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
module github.com/Equanox/gotron

require (
bou.ke/monkey v1.0.1 // indirect
github.com/Benchkram/errz v0.0.0-20180825145403-619d291cb54f
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gorilla/websocket v1.4.0
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1
github.com/otiai10/mint v1.2.1 // indirect
github.com/otiai10/copy v1.0.1
github.com/pkg/errors v0.8.0
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/puengel/copy v0.0.0-20190213151652-d7c02ea9f6bd
github.com/rs/zerolog v1.11.0
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/spf13/cobra v0.0.3
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1 h1:QJNFh2XEtzwESNsblZgBuCsv38DU5vC/u+5DNBekwJM=
github.com/otiai10/copy v0.0.0-20180813032824-7e9a647135a1/go.mod h1:pXzZSDlN+HPzSdyIBnKNN9ptD9Hx7iZMWIJPTwo4FPE=
github.com/otiai10/copy v1.0.1 h1:c+B8wnDMTYEWK36PULd7X4IARJDm+ANU2BOCQsfWrgQ=
github.com/otiai10/copy v1.0.1/go.mod h1:8bMCJrAqOtN/d9oyh5HR7HhLQMvcGMpGdwRDYsfOCHc=
github.com/otiai10/mint v1.2.1 h1:vDQzXgHumrrZvJp/ftsTB3NUaZQzjEh7HV7Hx27lZj4=
github.com/otiai10/mint v1.2.1/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw=
github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
11 changes: 9 additions & 2 deletions gotron_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ import (
"github.com/Equanox/gotron/internal/file"
"github.com/pkg/errors"

"github.com/puengel/copy"
"github.com/otiai10/copy"

"github.com/Benchkram/errz"
)

const (
templateApplicationDir = "templates/app"
gotronFileMode = os.FileMode(0755)
)

// Start starts an Instance of gotronbrowserwindow
Expand Down Expand Up @@ -119,10 +120,16 @@ func (gbw *BrowserWindow) copyElectronApplication(forceInstall bool) (err error)

if firstRun || forceInstall {
templateDir := filepath.Join(gbwDirectory, templateApplicationDir)
err = copy.Perm(templateDir, gbw.AppDirectory, 0777, 0644)
err = copy.Copy(templateDir, gbw.AppDirectory)
errz.Fatal(err)
}

err = os.Chmod(gbw.AppDirectory, gotronFileMode)
errz.Fatal(err)
assetsDir := filepath.Join(gbw.AppDirectory, "assets")
err = os.Chmod(assetsDir, gotronFileMode)
errz.Fatal(err)

// If no UI folder is set use default ui files
if gbw.UIFolder == "" {
return
Expand Down

0 comments on commit ce7e030

Please sign in to comment.