From ddf1fa7687fb989f3dd5a3fda7b3f0bf5d6d7e71 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 5 Apr 2014 16:36:47 -0400 Subject: Fix nautilus script installation to not crash when the nautilus script dir does not exist. Instead, only install scripts when the directory already exists. nautilus creates this directory each time run, so this avoids putting cruft in user's home --- Assistant/Install.hs | 5 +++-- debian/changelog | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Assistant/Install.hs b/Assistant/Install.hs index 4d02c0ece..883ca484c 100644 --- a/Assistant/Install.hs +++ b/Assistant/Install.hs @@ -87,8 +87,9 @@ installNautilus :: FilePath -> IO () #ifdef linux_HOST_OS installNautilus program = do scriptdir <- (\d -> d "nautilus" "scripts") <$> userDataDir - genscript scriptdir "get" - genscript scriptdir "drop" + whenM (doesDirectoryExist scriptdir) $ do + genscript scriptdir "get" + genscript scriptdir "drop" where genscript scriptdir action = installscript (scriptdir scriptname action) $ unlines diff --git a/debian/changelog b/debian/changelog index 3d07dbd74..3a94a6094 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ git-annex (5.20140403) UNRELEASED; urgency=medium * git-annex-shell: Added notifychanges command. * Improve display of dbus notifications. Thanks, Johan Kiviniemi. + * Fix nautilus script installation to not crash when the nautilus script dir + does not exist. Instead, only install scripts when the directory already + exists. -- Joey Hess Sat, 05 Apr 2014 15:05:44 -0400 -- cgit v1.2.3