mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
Merge pull request #114 from plonibarploni/spaces-gui
Don't remove spaces from SSID or passphrase
This commit is contained in:
commit
70a6d31fba
@ -57,11 +57,14 @@ int read_config_file() {
|
||||
|
||||
int i=0;
|
||||
while (getline(cFile, line)) {
|
||||
line.erase(std::remove_if(line.begin(), line.end(), isspace),
|
||||
line.end());
|
||||
auto delimiterPos = line.find('=');
|
||||
if (!(line.find("SSID") < delimiterPos) && !(line.find("PASSPHRASE") < delimiterPos)) {
|
||||
line.erase(std::remove_if(line.begin(), line.end(), isspace),
|
||||
line.end());
|
||||
}
|
||||
if (line[0] == '#' || line.empty())
|
||||
continue;
|
||||
auto delimiterPos = line.find('=');
|
||||
delimiterPos = line.find('='); //check again in case it changed
|
||||
auto name = line.substr(0, delimiterPos);
|
||||
auto value = line.substr(delimiterPos + 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user