From 0c1efd361be06189d9276ba4bdb75ac390d40643 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 8 Mar 2017 15:49:02 +0100 Subject: [PATCH] Make sure the href is updated everywhere when importing a stronger link --- www/common/mergeDrive.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/common/mergeDrive.js b/www/common/mergeDrive.js index bd7a95bff..70149467b 100644 --- a/www/common/mergeDrive.js +++ b/www/common/mergeDrive.js @@ -158,6 +158,15 @@ define([ // NOTE: if that weaker version is in the trash, the strong one will be put in unsorted var weaker = Cryptpad.findWeaker(href, newRecentPads); if (weaker) { + // Update RECENTPADS + newRecentPads.some(function (pad) { + if (pad.href === weaker) { + pad.href = href; + return true; + } + return; + }); + // Update the file in the drive newFo.replaceHref(weaker, href); return; }