Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3972)

Unified Diff: base/sys_info_posix.cc

Issue 12212010: Truncate the download file name if it exceeds the filesystem limit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Windows (UTF-16) support. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/sys_info_posix.cc
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
index f2119cd7fdb538ebc34699088387aa2381e8cc4e..e7664caa356069ace4a18aa50bf6c534c408b943 100644
--- a/base/sys_info_posix.cc
+++ b/base/sys_info_posix.cc
@@ -50,6 +50,12 @@ int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) {
return static_cast<int64>(stats.f_bavail) * stats.f_frsize;
}
+// static
+int SysInfo::GetMaximumPathComponentLength(const FilePath& path) {
+ base::ThreadRestrictions::AssertIOAllowed();
+ return pathconf(path.value().c_str(), _PC_NAME_MAX);
+}
+
#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
// static
std::string SysInfo::OperatingSystemName() {

Powered by Google App Engine
This is Rietveld 408576698