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/Restic.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Restic.hs') diff --git a/src/Propellor/Property/Restic.hs b/src/Propellor/Property/Restic.hs index d9d4d4be..9415f4bf 100644 --- a/src/Propellor/Property/Restic.hs +++ b/src/Propellor/Property/Restic.hs @@ -97,7 +97,7 @@ restored dir repo = go , noChange ) - needsRestore = null <$> catchDefaultIO [] (dirContents dir) + needsRestore = isUnpopulated dir restore = withTmpDirIn (takeDirectory dir) "restic-restore" $ \tmpdir -> do ok <- boolSystem "restic" -- cgit v1.2.3