Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions brand_fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/egoist/mygo/ui"
"gorex/internal/atomicfile"
"gorex/internal/homedir"
)

Expand Down Expand Up @@ -130,16 +131,7 @@ func fetchBrandSVG(id, baseURL string) {

if dir := brandCacheDir(); dir != "" {
if os.MkdirAll(dir, 0o755) == nil {
if tmp, err := os.CreateTemp(dir, id+".*.tmp"); err == nil {
tmpName := tmp.Name()
_, werr := tmp.Write(data)
cerr := tmp.Close()
if werr == nil && cerr == nil {
_ = os.Rename(tmpName, filepath.Join(dir, id+".svg"))
} else {
_ = os.Remove(tmpName)
}
}
_ = atomicfile.Write(filepath.Join(dir, id+".svg"), data, 0o644)
}
}

Expand Down
6 changes: 0 additions & 6 deletions browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ func browserURL(s string) string {
return "https://" + s
}

// browserCleanURL is the URL a browser pane keeps and shows: without the
// user info, which a layout file should not hold.

// browserCleanURL is the URL a browser pane keeps and shows: without the
// user info, which a layout file should not hold.
func browserCleanURL(u string) string {
Expand All @@ -64,6 +61,3 @@ func browserHost(s string) string {
}
return u.Host
}

// newBrowserPane makes a pane that shows url in a web view of the
// window's, with the address field given the keyboard.
5 changes: 3 additions & 2 deletions debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/egoist/mygo"
"github.com/egoist/mygo/plugins/terminal"

"gorex/internal/atomicfile"
"gorex/locales"
)

Expand Down Expand Up @@ -181,7 +182,7 @@ func (st *store) debug(dir, line string) {
var b []byte
debugMain(func() { b, _ = json.MarshalIndent(st.state(), "", " ") })
path := filepath.Join(dir, arg)
writeFileAtomic(path, b, 0o644)
atomicfile.Write(path, b, 0o644)
return
}
if a == nil {
Expand Down Expand Up @@ -309,7 +310,7 @@ func (a *App) debug(dir, line string) {
}
b, _ := json.MarshalIndent(a.panesDump(), "", " ")
path := filepath.Join(dir, name)
writeFileAtomic(path, b, 0o644)
atomicfile.Write(path, b, 0o644)
return
}
win := a.win
Expand Down
1 change: 0 additions & 1 deletion extpane.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ func (e *extPane) updateSync(fn func()) {

// The paneExt of an extension pack's pane.

func (e *extPane) kind() string { return e.def.Kind }
func (e *extPane) program() program { return e.prog }

// label is the pane's name, or the page of its web slot, or its own
Expand Down
Loading