RCS file: /cvsroot/filezilla/FileZilla/source/FtpListCtrl.cpp,v
retrieving revision 1.110
diff -u -r1.110 FtpListCtrl.cpp
|
|
|
2225 | 2225 | { |
2226 | 2226 | int nFormat=COptions::GetOptionVal(OPTION_REMOTEFILESIZEFORMAT); |
2227 | 2227 | if (!nFormat) |
2228 | | if (size<1024) |
2229 | | nFormat=1; |
2230 | | else if (size<(1024*1024)) |
2231 | | nFormat=2; |
| 2228 | if (size<1000) |
| 2229 | nFormat=1; // max 999 Bytes |
| 2230 | else if (size<(1022977)) |
| 2231 | nFormat=2; // max 999 KB |
2232 | 2232 | else |
2233 | | nFormat=3; |
| 2233 | nFormat=3; // MB |
2234 | 2234 | |
2235 | 2235 | CString tmp, sizestr; |
2236 | 2236 | switch (nFormat) |
… |
… |
|
2240 | 2240 | break; |
2241 | 2241 | case 2: |
2242 | 2242 | tmp.LoadString(IDS_SIZE_KBS); |
2243 | | sizestr.Format(_T("%I64d %s"), size/1024, tmp); |
| 2243 | sizestr.Format(_T("%I64d %s"), (size+1023)/1024, tmp); |
2244 | 2244 | break; |
2245 | 2245 | case 3: |
2246 | 2246 | tmp.LoadString(IDS_SIZE_MBS); |
2247 | | sizestr.Format(_T("%I64d %s"), size/1024/1024, tmp); |
| 2247 | sizestr.Format(_T("%I64d %s"), (size+1048575)/1048576, tmp); |
2248 | 2248 | break; |
2249 | 2249 | default: |
2250 | 2250 | ASSERT(FALSE); |
RCS file: /cvsroot/filezilla/FileZilla/source/LocalFileListCtrl.cpp,v
retrieving revision 1.79
diff -u -r1.79 LocalFileListCtrl.cpp
|
|
|
1508 | 1508 | { |
1509 | 1509 | int nFormat=COptions::GetOptionVal(OPTION_LOCALFILESIZEFORMAT); |
1510 | 1510 | if (!nFormat) |
1511 | | if (size<1024) |
1512 | | nFormat=1; |
1513 | | else if (size<(1024*1024)) |
1514 | | nFormat=2; |
| 1511 | if (size<1000) |
| 1512 | nFormat=1; // max 999 Bytes |
| 1513 | else if (size<(1022977)) |
| 1514 | nFormat=2; // max 999 KB |
1515 | 1515 | else |
1516 | | nFormat=3; |
| 1516 | nFormat=3; // MB |
1517 | 1517 | |
1518 | 1518 | CString tmp, sizestr; |
1519 | 1519 | switch (nFormat) |
… |
… |
|
1523 | 1523 | break; |
1524 | 1524 | case 2: |
1525 | 1525 | tmp.LoadString(IDS_SIZE_KBS); |
1526 | | sizestr.Format(_T("%I64d %s"), size/1024, tmp); |
| 1526 | sizestr.Format(_T("%I64d %s"), (size+1023)/1024, tmp); |
1527 | 1527 | break; |
1528 | 1528 | case 3: |
1529 | 1529 | tmp.LoadString(IDS_SIZE_MBS); |
1530 | | sizestr.Format(_T("%I64d %s"), size/1024/1024, tmp); |
| 1530 | sizestr.Format(_T("%I64d %s"), (size+1048575)/1048576, tmp); |
1531 | 1531 | break; |
1532 | 1532 | default: |
1533 | 1533 | ASSERT(FALSE); |