summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-02 13:12:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-02 13:12:36 -0400
commit6b38227bad8c303470a5b29f50360cea0206d9a1 (patch)
treeb3f1bdc2d29a6dbb291b20c4eb7e67d6609ee6fb /Build
parentd2b48cacdbb192e7501985e93e60b64fa57fa72d (diff)
only write data file when installing as normal user
Diffstat (limited to 'Build')
-rw-r--r--Build/InstallDesktopFile.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Build/InstallDesktopFile.hs b/Build/InstallDesktopFile.hs
index 3bc796315..ab2773bf1 100644
--- a/Build/InstallDesktopFile.hs
+++ b/Build/InstallDesktopFile.hs
@@ -46,9 +46,10 @@ writeDesktop command = do
writeDesktopMenuFile (autostart command) $
autoStartPath "git-annex" configdir
- programfile <- programFile
- createDirectoryIfMissing True (parentDir programFile)
- writeFile programfile command
+ when (uid /= 0) $ do
+ programfile <- programFile
+ createDirectoryIfMissing True (parentDir programFile)
+ writeFile programfile command
main = getArgs >>= go
where