diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-05 16:42:57 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-05 16:42:57 -0400 |
| commit | f9f1158c0c0fc173045ec7bb7fcbacdd76b24ffd (patch) | |
| tree | 4979081a0ef5e6ddd8b6ba043a46ba6414914d5d /src | |
| parent | 60db0d5761254f5074a5d312ebb498bf031379a5 (diff) | |
avoid overwriting existing file
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/XFCE.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Propellor/Property/XFCE.hs b/src/Propellor/Property/XFCE.hs index e3dd060e..a1b9d7d7 100644 --- a/src/Propellor/Property/XFCE.hs +++ b/src/Propellor/Property/XFCE.hs @@ -26,13 +26,15 @@ defaultPanelFor u@(User username) = property' desc $ \w -> do ensureProperty w (go home) where desc = "default XFCE panel for " ++ username - cf = ".config" </> "xfce4" </> "xfconf" + basecf = ".config" </> "xfce4" </> "xfconf" </> "xfce-perchannel-xml" </> "xfce4-panel.xml" -- This location is probably Debian-specific. defcf = "/etc/xdg/xfce4/panel/default.xml" go :: FilePath -> Property DebianLike - go home = tightenTargets $ - (home </> cf) `File.isCopyOf` defcf - `before` File.applyPath home cf + go home = tightenTargets $ check (not <$> doesFileExist cf) $ + cf `File.isCopyOf` defcf + `before` File.applyPath home basecf (\f -> File.ownerGroup f u (userGroup u)) `requires` Apt.installed ["xfce4-panel"] + where + cf = home </> basecf |
