Fix cd to path with spaces

This commit is contained in:
William Brawner 2022-07-27 21:19:31 -06:00
parent 938e650592
commit c378b0e1d5

View file

@ -119,7 +119,7 @@ fn handle_connection(mut stream: TcpStream) {
Some(command) => {
let response: String = match command {
"cat" => cat(command_iter.next().unwrap()),
"cd" => match cd(command_iter.next().unwrap()) {
"cd" => match cd(&request[3..]) {
Ok(s) => s.to_string(),
Err(e) => e.to_string(),
},