Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ On Linux:
systemctl --user stop clipper.service
systemctl --user disable clipper.service
sudo rm /usr/local/bin/clipper
rm -r ~/.config/clipper

To kill a manually-launched instance of Clipper, just hit Control+C in the terminal where it is running.

Expand Down
4 changes: 4 additions & 0 deletions clipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ func main() {
// Merge flags -> config -> defaults.
mergeSettings()

if runtime.GOOS == "linux" {
configDir := expandPath(filepath.Dir(settings.Logfile.value))
os.MkdirAll(configDir, 0700)
}
expandedPath := expandPath(settings.Logfile.value)
outfile, err := os.OpenFile(expandedPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600)
if err != nil {
Expand Down