diff options
Diffstat (limited to 'src/core/download_manager_delegate_qt.cpp')
-rw-r--r-- | src/core/download_manager_delegate_qt.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp index 724b33a7a..2af958068 100644 --- a/src/core/download_manager_delegate_qt.cpp +++ b/src/core/download_manager_delegate_qt.cpp @@ -175,8 +175,15 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem* int uniquifier = base::GetUniquePathNumber(tmpFilePath, base::FilePath::StringType()); if (uniquifier > 0) suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(base::StringPrintf(" (%d)", uniquifier)).AsUTF8Unsafe()); - else if (uniquifier == -1) - suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(base::StringPrintf(" - %s", base::TimeToISO8601(item->GetStartTime()).c_str())).AsUTF8Unsafe()); + else if (uniquifier == -1) { + base::Time::Exploded exploded; + item->GetStartTime().LocalExplode(&exploded); + std::string suffix = base::StringPrintf( + " - %04d-%02d-%02dT%02d%02d%02d.%03d", exploded.year, exploded.month, + exploded.day_of_month, exploded.hour, exploded.minute, + exploded.second, exploded.millisecond); + suggestedFilePath = toQt(tmpFilePath.InsertBeforeExtensionASCII(suffix).AsUTF8Unsafe()); + } item->AddObserver(this); QList<ProfileAdapterClient*> clients = m_profileAdapter->clients(); |