diff options
-rw-r--r-- | Utility/FileMode.hs | 11 | ||||
-rw-r--r-- | doc/design/assistant/android.mdwn | 3 | ||||
-rw-r--r-- | git-annex.cabal | 2 | ||||
-rwxr-xr-x | standalone/android/runshell | 17 |
4 files changed, 23 insertions, 10 deletions
diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs index 0f7046333..b6bb579b5 100644 --- a/Utility/FileMode.hs +++ b/Utility/FileMode.hs @@ -10,6 +10,7 @@ module Utility.FileMode where import Common import Control.Exception (bracket) +import Utility.Exception import System.Posix.Types import Foreign (complement) @@ -103,10 +104,16 @@ setSticky :: FilePath -> IO () setSticky f = modifyFileMode f $ addModes [stickyMode] {- Writes a file, ensuring that its modes do not allow it to be read - - by anyone other than the current user, before any content is written. -} + - by anyone other than the current user, before any content is written. + - + - On a filesystem that does not support file permissions, this is the same + - as writeFile. + -} writeFileProtected :: FilePath -> String -> IO () writeFileProtected file content = do h <- openFile file WriteMode - modifyFileMode file $ removeModes [groupReadMode, otherReadMode] + void $ tryIO $ + modifyFileMode file $ + removeModes [groupReadMode, otherReadMode] hPutStr h content hClose h diff --git a/doc/design/assistant/android.mdwn b/doc/design/assistant/android.mdwn index 2285da556..3f0ab9c3d 100644 --- a/doc/design/assistant/android.mdwn +++ b/doc/design/assistant/android.mdwn @@ -36,6 +36,3 @@ transfers when not on wifi. This may need to be configurable. currently install. * Get test suite to pass. Current failure is because `git fetch` is somehow broken with local repositories. -* Webapp: Bootstrap icons are not displayed. Check, is this a problem - with the icon file not being served up with right content, or is it - a browser incompatability? diff --git a/git-annex.cabal b/git-annex.cabal index 829b7b2aa..79bb59ca7 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 4.20130501 +Version: 4.20130502 Cabal-Version: >= 1.8 License: GPL Maintainer: Joey Hess <joey@kitenet.net> diff --git a/standalone/android/runshell b/standalone/android/runshell index 47fe9d884..3ff9617d7 100755 --- a/standalone/android/runshell +++ b/standalone/android/runshell @@ -74,9 +74,6 @@ install () { } run () { - # As good a start point as any. - cd "$HOME" - PATH="$base/bin:$PATH" export PATH @@ -104,7 +101,19 @@ run () { shift 1 exec "$cmd" "$@" else - git annex webapp & + # Ensure home directory exists, even if it got deleted + # somehow. + if ! $cmd mkdir -p "$HOME"; then + $cmd echo "mkdir of $HOME failed!" + fi + + # As good a start point as any. + cd "$HOME" + + $cmd echo "Starting git-annex interface, please wait ..." + # For some reason this needs to run in the foreground. + $cmd nohup git annex webapp + $cmd echo "The git-annex interface is no longer running." /system/bin/sh fi } |