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

Unified Diff: net/ftp/ftp_directory_listing_parser_ls.cc

Issue 11418296: FTP: misc fixes resulting from my testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: data files Created 8 years 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: net/ftp/ftp_directory_listing_parser_ls.cc
diff --git a/net/ftp/ftp_directory_listing_parser_ls.cc b/net/ftp/ftp_directory_listing_parser_ls.cc
index ab0f487680fd5c8a8e40a4c341beabd9b9b651a8..2105dbaaf8d76a0ed9432e7eed5e1752215f1800 100644
--- a/net/ftp/ftp_directory_listing_parser_ls.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls.cc
@@ -24,11 +24,13 @@ bool LooksLikeUnixPermission(const string16& text) {
// r - file is readable
// w - file is writable
// x - file is executable
+ // l - unknown
mmenke 2012/12/03 21:59:05 A quick search got me to "http://www.unix.com/tips
// s or S - setuid/setgid bit set
// t or T - "sticky" bit set
return ((text[0] == 'r' || text[0] == '-') &&
(text[1] == 'w' || text[1] == '-') &&
- (text[2] == 'x' || text[2] == 's' || text[2] == 'S' ||
+ (text[2] == 'x' || text[2] == 'l' ||
+ text[2] == 's' || text[2] == 'S' ||
text[2] == 't' || text[2] == 'T' || text[2] == '-'));
}
@@ -180,8 +182,8 @@ bool ParseFtpDirectoryListingLs(
if (columns.size() == 2 && !received_total_line) {
received_total_line = true;
- int total_number;
- if (!base::StringToInt(columns[1], &total_number))
+ int64 total_number;
+ if (!base::StringToInt64(columns[1], &total_number))
return false;
if (total_number < 0)
return false;

Powered by Google App Engine
This is Rietveld 408576698