From 9216718fa0544c827b2a2648a85deae82a2be2f0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Jan 2019 13:18:42 -0400 Subject: [PATCH] fix one more export conflict false positive Somehow forgot about the case where the current export db tree is the same one in the export log, and it warned about an export conflict when getting a file in that situation. Of course it's no conflict at all! This commit was sponsored by Jochen Bartl on Patreon. --- Database/Export.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Database/Export.hs b/Database/Export.hs index ab36f96a01..8cec999a7b 100644 --- a/Database/Export.hs +++ b/Database/Export.hs @@ -218,9 +218,11 @@ updateExportTreeFromLog db@(ExportHandle _ u) = l <- Log.getExport u case Log.exportedTreeishes l of [] -> return ExportUpdateSuccess - (new:[]) | new /= old -> do - updateExportTree db old new - liftIO $ recordExportTreeCurrent db new - liftIO $ flushDbQueue db - return ExportUpdateSuccess + (new:[]) + | new /= old -> do + updateExportTree db old new + liftIO $ recordExportTreeCurrent db new + liftIO $ flushDbQueue db + return ExportUpdateSuccess + | new == old -> return ExportUpdateSuccess _ts -> return ExportUpdateConflict