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
This commit is contained in:
parent
66f7354dae
commit
ade5d8ccc5
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue