move lock file to dataDir #79

This commit is contained in:
piotr
2022-12-11 23:05:57 +01:00
parent 63117e2605
commit ab5e2ea6ae
2 changed files with 15 additions and 12 deletions

View File

@@ -189,7 +189,7 @@ func main() {
// Otherwise the command may behave in two ways:
// 1. kill the running non-residennt instance and exit;
// 2. die if a resident instance found.
lockFilePath := path.Join(tempDir(), "nwg-drawer.lock")
lockFilePath := path.Join(dataDir(), "nwg-drawer.lock")
lockFile, err := singleinstance.CreateLockFile(lockFilePath)
if err != nil {
pid, err := readTextFile(lockFilePath)