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

Unified Diff: base/file_util_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 test. 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/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index da7a09669e396aa4aaf6dce9d27cbe5d35d4ffec..62bc9b3f9b061ced5e1201f1b2ddc405e29f321a 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -1132,4 +1132,9 @@ bool VerifyPathControlledByAdmin(const FilePath& path) {
}
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+int GetMaximumPathComponentLength(const FilePath& path) {
+ base::ThreadRestrictions::AssertIOAllowed();
+ return pathconf(path.value().c_str(), _PC_NAME_MAX);
+}
+
} // namespace file_util

Powered by Google App Engine
This is Rietveld 408576698