From b437fa963d7e44945d24c1c5a6453cebcaf7a682 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 19 Oct 2017 21:35:29 +0200 Subject: Use isUnpopulated when creating a chroot or restoring a backup --- src/Propellor/Property/Obnam.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Obnam.hs') diff --git a/src/Propellor/Property/Obnam.hs b/src/Propellor/Property/Obnam.hs index 7943b46e..264d6748 100644 --- a/src/Propellor/Property/Obnam.hs +++ b/src/Propellor/Property/Obnam.hs @@ -113,7 +113,7 @@ restored dir params = go `requires` installed , noChange ) - needsRestore = null <$> catchDefaultIO [] (dirContents dir) + needsRestore = isUnpopulated dir restore = withTmpDirIn (takeDirectory dir) "obnam-restore" $ \tmpdir -> do ok <- boolSystem "obnam" $ -- cgit v1.2.3