Loweynet
リビジョン | 2a2b6d8b2448f4acb3e987ade7712712bce5a686 (tree) |
---|---|
日時 | 2012-11-08 23:08:20 |
作者 | s_kawamoto <s_kawamoto@user...> |
コミッター | s_kawamoto |
Fix bugs of handling of time stamps.
@@ -2838,6 +2838,7 @@ void MakeSelectedFileList(int Win, int Expand, int All, FILELIST **Base, int *Ca | ||
2838 | 2838 | |
2839 | 2839 | if(Ignore == NO) |
2840 | 2840 | { |
2841 | +// Pkt.Node = NODE_DIR; | |
2841 | 2842 | if(GetImageIndex(Win, Pos) == 4) // symlink |
2842 | 2843 | Pkt.Node = NODE_FILE; |
2843 | 2844 | else |
@@ -2847,6 +2848,18 @@ void MakeSelectedFileList(int Win, int Expand, int All, FILELIST **Base, int *Ca | ||
2847 | 2848 | memset(&Pkt.Time, 0, sizeof(FILETIME)); |
2848 | 2849 | AddFileList(&Pkt, Base); |
2849 | 2850 | |
2851 | +// if(Win == WIN_LOCAL) | |
2852 | +// MakeLocalTree(Name, Base); | |
2853 | +// else | |
2854 | +// { | |
2855 | +// AskRemoteCurDir(Cur, FMAX_PATH); | |
2856 | +// | |
2857 | +// if((AskListCmdMode() == NO) && | |
2858 | +// (AskUseNLST_R() == YES)) | |
2859 | +// MakeRemoteTree1(Name, Cur, Base, CancelCheckWork); | |
2860 | +// else | |
2861 | +// MakeRemoteTree2(Name, Cur, Base, CancelCheckWork); | |
2862 | +// } | |
2850 | 2863 | if(GetImageIndex(Win, Pos) != 4) { // symlink |
2851 | 2864 | if(Win == WIN_LOCAL) |
2852 | 2865 | MakeLocalTree(Name, Base); |
@@ -3081,8 +3094,9 @@ static void MakeRemoteTree2(char *Path, char *Cur, FILELIST **Base, int *CancelC | ||
3081 | 3094 | |
3082 | 3095 | /* まずディレクトリ名をセット */ |
3083 | 3096 | strcpy(Pkt.File, Pos->File); |
3097 | +// Pkt.Node = NODE_DIR; | |
3084 | 3098 | Pkt.Link = Pos->Link; |
3085 | - if(Pkt.Link) | |
3099 | + if(Pkt.Link == YES) | |
3086 | 3100 | Pkt.Node = NODE_FILE; |
3087 | 3101 | else |
3088 | 3102 | Pkt.Node = NODE_DIR; |
@@ -3092,7 +3106,8 @@ static void MakeRemoteTree2(char *Path, char *Cur, FILELIST **Base, int *CancelC | ||
3092 | 3106 | AddFileList(&Pkt, Base); |
3093 | 3107 | |
3094 | 3108 | /* そのディレクトリの中を検索 */ |
3095 | - if(!Pkt.Link) | |
3109 | +// MakeRemoteTree2(Pos->File, Cur, Base, CancelCheckWork); | |
3110 | + if(Pkt.Link == NO) | |
3096 | 3111 | MakeRemoteTree2(Pos->File, Cur, Base, CancelCheckWork); |
3097 | 3112 | } |
3098 | 3113 | Pos = Pos->Next; |
@@ -1155,19 +1155,30 @@ void FileTime2TimeString(FILETIME *Time, char *Buf, int Mode, int InfoExist) | ||
1155 | 1155 | FileTimeToLocalFileTime(Time, &fTime); |
1156 | 1156 | FileTimeToSystemTime(&fTime, &sTime); |
1157 | 1157 | |
1158 | - if(InfoExist & FINFO_DATE) | |
1159 | - sprintf(Buf, "%04d/%02d/%02d ", sTime.wYear, sTime.wMonth, sTime.wDay); | |
1160 | - else | |
1161 | - sprintf(Buf, " "); | |
1162 | - | |
1163 | - if(InfoExist & FINFO_TIME) | |
1164 | - // タイムスタンプのバグ修正 | |
1158 | + // タイムスタンプのバグ修正 | |
1159 | +// if(InfoExist & FINFO_DATE) | |
1160 | +// sprintf(Buf, "%04d/%02d/%02d ", sTime.wYear, sTime.wMonth, sTime.wDay); | |
1161 | +// else | |
1162 | +// sprintf(Buf, " "); | |
1163 | +// | |
1164 | +// if(InfoExist & FINFO_TIME) | |
1165 | 1165 | // sprintf(Buf+11, "%2d:%02d", sTime.wHour, sTime.wMinute); |
1166 | - sprintf(Buf+11, "%2d:%02d:%02d", sTime.wHour, sTime.wMinute, sTime.wSecond); | |
1167 | - else | |
1168 | - // タイムスタンプのバグ修正 | |
1166 | +// else | |
1169 | 1167 | // sprintf(Buf+11, " "); |
1170 | - sprintf(Buf+11, " "); | |
1168 | + if(InfoExist & (FINFO_DATE | FINFO_TIME)) | |
1169 | + { | |
1170 | + if(InfoExist & FINFO_DATE) | |
1171 | + sprintf(Buf, "%04d/%02d/%02d ", sTime.wYear, sTime.wMonth, sTime.wDay); | |
1172 | + else | |
1173 | + sprintf(Buf, " "); | |
1174 | + | |
1175 | + if(InfoExist & FINFO_TIME) | |
1176 | + sprintf(Buf+11, "%2d:%02d:%02d", sTime.wHour, sTime.wMinute, sTime.wSecond); | |
1177 | + else | |
1178 | + sprintf(Buf+11, " "); | |
1179 | + } | |
1180 | + else | |
1181 | + Buf[0] = NUL; | |
1171 | 1182 | } |
1172 | 1183 | else |
1173 | 1184 | { |