32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
|
--- lftp-3.4.1/src/commands.cc.dont_core 2006-02-06 05:57:29.000000000 -0500
|
||
|
+++ lftp-3.4.1/src/commands.cc 2006-02-07 17:53:14.000000000 -0500
|
||
|
@@ -1508,15 +1508,19 @@
|
||
|
if(time_style && time_style[0]) {
|
||
|
if(time_style[0]=='+')
|
||
|
time_fmt=xstrdup(time_style+1);
|
||
|
- else if(!strcmp(optarg,"full-iso"))
|
||
|
-// time_fmt=xstrdup("%Y-%m-%d %H:%M:%S.%N %z"); // %N and %z are GNU extensions
|
||
|
- time_fmt=xstrdup("%Y-%m-%d %H:%M:%S");
|
||
|
- else if(!strcmp(optarg,"long-iso"))
|
||
|
- time_fmt=xstrdup("%Y-%m-%d %H:%M");
|
||
|
- else if(!strcmp(optarg,"iso"))
|
||
|
- time_fmt=xstrdup("%Y-%m-%d \n%m-%d %H:%M");
|
||
|
- else
|
||
|
- time_fmt=xstrdup(time_style);
|
||
|
+ if( optarg )
|
||
|
+ {
|
||
|
+ if(!strcmp(optarg,"full-iso"))
|
||
|
+ // time_fmt=xstrdup("%Y-%m-%d %H:%M:%S.%N %z"); // %N and %z are GNU extensions
|
||
|
+ time_fmt=xstrdup("%Y-%m-%d %H:%M:%S");
|
||
|
+ else if(!strcmp(optarg,"long-iso"))
|
||
|
+ time_fmt=xstrdup("%Y-%m-%d %H:%M");
|
||
|
+ else if(!strcmp(optarg,"iso"))
|
||
|
+ time_fmt=xstrdup("%Y-%m-%d \n%m-%d %H:%M");
|
||
|
+ else
|
||
|
+ time_fmt=xstrdup(time_style);
|
||
|
+ }else
|
||
|
+ time_fmt=xstrdup(time_style);
|
||
|
need_exact_time=false;
|
||
|
if(time_fmt) {
|
||
|
static const char exact_fmts[][3]={"%H","%M","%S","%N",""};
|