From: Dirk Koopman Date: Wed, 20 May 2020 14:59:58 +0000 (+0100) Subject: belt and braces locate users.v4 in DXUser.pm X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=4d5eead128f00eea3c8aa531c68c014825ccca7a belt and braces locate users.v4 in DXUser.pm --- diff --git a/perl/DXUser.pm b/perl/DXUser.pm index ee24c5d4..5e8f2dfa 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -897,10 +897,13 @@ sub readinjson move($nfn, $fn); }; - # if we don't have a users.v4 at this point, look for a backup users.v4.o + # if we don't have a users.v4 at this point, look for a backup users.v4.json, users.v4.n then users.v4.o unless (-e $fn) { - move($ofn, $fn); + move($nfn, $fn) unless -e $fn; # the users.v4 isn't there (maybe convert-users-v3-to-v4.pl + move("$fn.json", $fn); # from a run of convert-users-v3-to-v4.pl + move($ofn, $fn) unless -e $fn; # desperate now... } + if ($ifh) { $ifh->seek(0, 0); } else {