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.
This commit is contained in:
parent
3b9b6c965d
commit
9216718fa0
1 changed files with 7 additions and 5 deletions
|
@ -218,9 +218,11 @@ updateExportTreeFromLog db@(ExportHandle _ u) =
|
||||||
l <- Log.getExport u
|
l <- Log.getExport u
|
||||||
case Log.exportedTreeishes l of
|
case Log.exportedTreeishes l of
|
||||||
[] -> return ExportUpdateSuccess
|
[] -> return ExportUpdateSuccess
|
||||||
(new:[]) | new /= old -> do
|
(new:[])
|
||||||
updateExportTree db old new
|
| new /= old -> do
|
||||||
liftIO $ recordExportTreeCurrent db new
|
updateExportTree db old new
|
||||||
liftIO $ flushDbQueue db
|
liftIO $ recordExportTreeCurrent db new
|
||||||
return ExportUpdateSuccess
|
liftIO $ flushDbQueue db
|
||||||
|
return ExportUpdateSuccess
|
||||||
|
| new == old -> return ExportUpdateSuccess
|
||||||
_ts -> return ExportUpdateConflict
|
_ts -> return ExportUpdateConflict
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue