From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Whatson Newsgroups: gmane.emacs.bugs Subject: bug#43532: [PATCH] Fix timestamp check when loading from eln (bug #43532) Date: Thu, 15 Oct 2020 16:52:51 +1000 Message-ID: <20201015065250.3985138-1-whatson@gmail.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22745"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrew Whatson To: 43532@debbugs.gnu.org, Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 15 08:56:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSxBM-0005py-0d for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 08:56:12 +0200 Original-Received: from localhost ([::1]:53654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSxBL-0002l3-46 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 02:56:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSxBC-0002jX-LT for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 02:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSxBB-0004eY-QT for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 02:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSxBB-00045W-OU for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 02:56:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Andrew Whatson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Oct 2020 06:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43532 X-GNU-PR-Package: emacs Original-Received: via spool by 43532-submit@debbugs.gnu.org id=B43532.160274490615642 (code B ref 43532); Thu, 15 Oct 2020 06:56:01 +0000 Original-Received: (at 43532) by debbugs.gnu.org; 15 Oct 2020 06:55:06 +0000 Original-Received: from localhost ([127.0.0.1]:53955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSxAI-00044C-8K for submit@debbugs.gnu.org; Thu, 15 Oct 2020 02:55:06 -0400 Original-Received: from mail-pl1-f178.google.com ([209.85.214.178]:39785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSxAG-00043c-HR for 43532@debbugs.gnu.org; Thu, 15 Oct 2020 02:55:05 -0400 Original-Received: by mail-pl1-f178.google.com with SMTP id y1so1089909plp.6 for <43532@debbugs.gnu.org>; Wed, 14 Oct 2020 23:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jRcGwnbFa6ddpcD2SWUDcX+Cd9M6E9gLxepWohz1h9I=; b=qPXszknn5Fv9FJTrw5M+GaOXjQIvVcIHHbCzdxWidKHl7vNoCByPtQU4oaPS4R709D n7dIbEl2dD2Kohy0YxUYmqHq2K/5PfPvzFUPNd5EwgSWTsjVr+sWU6vVxteRWknG1B/y ScxzjbiU6evTRsZQ8S99y7Vo7x3digyR8iMyFZFn5YKNn837dffsQZNlPlQJMF6TuzUv nCijx4QOqn7x2a2+g/hOaxD/rc9cLCpbkbdXPnkSIYmSkE8PcPMOS02hb0vbTkUzWL9o hI0sRT+uegGSdyRmOzq8+4FMtFOh6tgImCD+4gos+WbfFn57RSaEMlgFQ7dKZsrElGk1 HpfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jRcGwnbFa6ddpcD2SWUDcX+Cd9M6E9gLxepWohz1h9I=; b=D3G8n5IlzMefT7ufAEFw0/PUW3kxHa13O5d4nfBBKg9ELg3O/HjMLDsB26NJopdApy iYM+KqQdU09WgCTiucWXZG5qedc7J8lEb87sTwgWh0SiZYfRkovL0oIH+j7zJ7tl00b0 vCc1Wkf7bfhXeUUVxRyu2vwD3B0YToUOcBfPekeRmFs/oDEsfPBH7BaVBRKd9XdexAAR 1VuPNaxncq5wYnbRxoxEPXZlLB7LflDqeL1PTQYtrY7An1tg55jURqlhYaveMMo0XgIl ILu0U1w8lSZyM2N0TSk4tYpyZP24DK7UjhoaOD4qNsB3KPSf4p60Z/N0Dj4caCg6zhA2 u2vg== X-Gm-Message-State: AOAM531+VntZo1xvdz1Ze8HVx6iRGpvouePP/v5l6r9BgA8h+Wh6ElZH hG/ZvnTaz/qBt3C4oA7OxlPHY+oZznjgVg== X-Google-Smtp-Source: ABdhPJxL7jeTwvDDrosgqDHbiqMoWuXRDgq+PZq9K+s9hQ1BdDdFyJa8pYy/KtO0QttJfIB6RScQ6Q== X-Received: by 2002:a17:90a:7788:: with SMTP id v8mr3040763pjk.8.1602744898383; Wed, 14 Oct 2020 23:54:58 -0700 (PDT) Original-Received: from muon.fritz.box (61-68-62-152.tpgi.com.au. [61.68.62.152]) by smtp.gmail.com with ESMTPSA id j25sm1859293pfn.212.2020.10.14.23.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 23:54:57 -0700 (PDT) X-Mailer: git-send-email 2.28.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190543 Archived-At: * src/lread.c (maybe_swap_for_eln): Allow eln files to have the same timestamp as their source file. --- src/lread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lread.c b/src/lread.c index ea31131b75..ab16fdadb4 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1622,7 +1622,7 @@ maybe_swap_for_eln (Lisp_Object *filename, int *fd, struct timespec mtime) else { struct timespec eln_mtime = get_stat_mtime (&eln_st); - if (timespec_cmp (eln_mtime, mtime) > 0) + if (timespec_cmp (eln_mtime, mtime) >= 0) { *filename = eln_name; emacs_close (*fd); -- 2.28.0