GNU bug report logs - #62497
maybe date -f <directory> should generate an error

Previous Next

Package: coreutils;

Reported by: Sylvestre Ledru <sylvestre <at> debian.org>

Date: Tue, 28 Mar 2023 07:17:04 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#62497: closed (maybe date -f <directory> should generate an
 error)
Date: Tue, 28 Mar 2023 08:55:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 28 Mar 2023 01:54:02 -0700
with message-id <a4dba532-97f8-5c00-5521-08601f70730e <at> cs.ucla.edu>
and subject line Re: bug#62497: maybe date -f <directory> should generate an error
has caused the debbugs.gnu.org bug report #62497,
regarding maybe date -f <directory> should generate an error
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
62497: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62497
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sylvestre Ledru <sylvestre <at> debian.org>
To: bug-coreutils <at> gnu.org
Subject: maybe date -f <directory> should generate an error
Date: Mon, 27 Mar 2023 20:44:40 +0200
Hello

The usual case is:

$ echo "2023-03-27 08:30:00" > dates.txt
$ echo "2023-04-01 12:00:00" >> dates.txt

$ /usr/bin/date -f dates.txt
Mon Mar 27 08:30:00 CEST 2023
Sat Apr 1 12:00:00 CEST 2023

If done on a non existing file, we get:

$ date -f non-existing
/usr/bin/date: non-existing: No such file or directory

Maybe it should do the same on a directory:

 $ /usr/bin/date -f /
doesn't show anything and return 0

Cheers,
Sylvestre




[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Sylvestre Ledru <sylvestre <at> debian.org>
Cc: 62497-done <at> debbugs.gnu.org
Subject: Re: bug#62497: maybe date -f <directory> should generate an error
Date: Tue, 28 Mar 2023 01:54:02 -0700
[Message part 4 (text/plain, inline)]
Thanks for reporting that. I installed the attached to fix it.
[0001-date-diagnose-f-read-errors.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.