Chromium Code Reviews| Index: net/base/net_util.cc |
| =================================================================== |
| --- net/base/net_util.cc (revision 1680) |
| +++ net/base/net_util.cc (working copy) |
| @@ -819,9 +819,13 @@ |
| result.append(","); |
| - Time time(Time::FromFileTime(*modified)); |
| - string_escape::JavascriptDoubleQuote(base::TimeFormatShortDateAndTime(time), |
| - true, &result); |
| + std::wstring modified_str; |
| + // |modified| can be NULL in FTP listings. |
| + if (modified) { |
| + Time time(Time::FromFileTime(*modified)); |
| + modified_str = base::TimeFormatShortDateAndTime(time); |
| + } |
| + string_escape::JavascriptDoubleQuote(modified_str, true, &result); |
|
brettw
2008/09/03 18:48:48
Can all the code be moved inside the if statement?
|
| result.append(");</script>\n"); |