From 70af36496ce8102926c07ab02ae232e4df5b47e4 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 20 Nov 2011 22:29:12 +0200 Subject: better "\x20" handling --- server/server/config.cpp | 7 ++++--- 1 file 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)); -- cgit v1.2.3