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/Attic.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Attic.hs') diff --git a/src/Propellor/Property/Attic.hs b/src/Propellor/Property/Attic.hs index 8ab5546b..f8113e2a 100644 --- a/src/Propellor/Property/Attic.hs +++ b/src/Propellor/Property/Attic.hs @@ -59,7 +59,7 @@ restored dir backupdir = go `requires` installed , noChange ) - needsRestore = null <$> catchDefaultIO [] (dirContents dir) + needsRestore = isUnpopulated dir restore = withTmpDirIn (takeDirectory dir) "attic-restore" $ \tmpdir -> do ok <- boolSystem "attic" $ -- cgit v1.3-2-g0d8e