vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Mon, 18 Jun 2007, Tim van der Molen wrote: > Hello, > > `touch -t' fails for any time specification with a `.SS' part. For > example: > > $ touch -t 01010000.01 foo > touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS] > > The following diff fixes this. This is indeed a bug in -current (next time please mention what you are running). The diff looks correct, thanks. -Otto > > Regards, > Tim > > Index: touch.c > ================================================== ================= > RCS file: /cvs/src/usr.bin/touch/touch.c,v > retrieving revision 1.15 > diff -u -r1.15 touch.c > --- touch.c 25 May 2007 13:56:59 -0000 1.15 > +++ touch.c 18 Jun 2007 01:07:58 -0000 > @@ -181,7 +181,7 @@ > err(1, "localtime"); > /* [[CC]YY]MMDDhhmm[.SS] */ > for (p = arg, dot = NULL; *p != '\0'; p++) { > - if (*p == '.' && dot != NULL) > + if (*p == '.' && dot == NULL) > dot = p; > else if (!isdigit((unsigned char)*p)) > goto terr; |
| Thread Tools | |
| Display Modes | |
|
|