diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2011-11-20 22:29:12 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2011-11-20 22:29:12 +0200 |
commit | 70af36496ce8102926c07ab02ae232e4df5b47e4 (patch) | |
tree | 44af7a78da7f842eae4a980f44ed083496b48145 | |
parent | a0c7d3d6d11c211beceee22718ab12a80ab3a343 (diff) |
better "\x20" handling
-rw-r--r-- | server/server/config.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/server/config.cpp b/server/server/config.cpp index 22e0a8c..60b7946 100644 --- a/server/server/config.cpp +++ b/server/server/config.cpp @@ -84,10 +84,11 @@ void config::load_upload_list(char *pth) std::string::size_type lp1 = 0, lp2 = 0; std::string source, destination, hash; byte *hash_buf = NULL; - lp2 = line.find('\x20', lp1); + lp1++; + lp2 = line.find('"', lp1); source = line.substr(lp1, lp2-lp1); - lp1 = lp2+1; - lp2 = line.find(l, lp1); + lp1 = lp2+3; + lp2 = line.find('"', lp1); destination = line.substr(lp1, lp2-lp1); //TODO calc hash upload_list.push_back(upload_entry(source, destination, hash)); |