Skip to content

Commit

Permalink
fix(filebrowser): convert "/root" into an OsString
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenclaw900 committed Nov 6, 2021
1 parent 9e606bb commit 279c71a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/src/sockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async fn browser_handler(
.send(Message::text(SerJson::serialize_json(
&types::BrowserList {
contents: systemdata::browser_dir(std::path::Path::new(
&std::env::var_os("HOME").unwrap_or("/root"),
&std::env::var_os("HOME").unwrap_or_else(|| "/root".into()),
)),
},
)))
Expand Down

0 comments on commit 279c71a

Please sign in to comment.