From 127463e577b0f462241f82817a6b94e75d3230a8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Feb 2013 12:54:41 -0400 Subject: [PATCH] webapp: Allow creating repositories on filesystems that lack support for symlinks. --- Assistant/WebApp/Configurators/Local.hs | 14 -------------- debian/changelog | 2 ++ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index 37fca5738d..2cfc7dbd63 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -82,7 +82,6 @@ checkRepositoryPath p = do , (return $ path == home, "Sorry, using git-annex for your whole home directory is not currently supported.") , (not <$> doesDirectoryExist parent, "Parent directory does not exist.") , (not <$> canWrite path, "Cannot write a repository there.") - , (not <$> canMakeSymlink path, "That directory is on a filesystem that does not support symlinks. Try a different location.") ] return $ case headMaybe problems of @@ -306,16 +305,3 @@ canWrite dir = do tocheck <- ifM (doesDirectoryExist dir) (return dir, return $ parentDir dir) catchBoolIO $ fileAccess tocheck False True False - -{- Checks if a directory is on a filesystem that supports symlinks. -} -canMakeSymlink :: FilePath -> IO Bool -canMakeSymlink dir = ifM (doesDirectoryExist dir) - ( catchBoolIO $ test dir - , canMakeSymlink (parentDir dir) - ) - where - test d = do - let link = d "delete.me" - createSymbolicLink link link - removeLink link - return True diff --git a/debian/changelog b/debian/changelog index 60d192e55c..91ed0dccfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ git-annex (3.20130217) UNRELEASED; urgency=low * Should now fully support git repositories with core.symlinks=false; always using git's pseudosymlink files in such repositories. + * webapp: Allow creating repositories on filesystems that lack support for + symlinks. -- Joey Hess Sun, 17 Feb 2013 16:42:16 -0400