diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-11-23 20:38:04 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-11-24 00:03:49 +0000 |
| commit | d8ff9aa58ab13f40cc69dbba673d97265c5f8a44 (patch) | |
| tree | 004300c8a7ee805b6a3a9992907715adc6d38446 /mullvad-problem-report | |
| parent | 2098917543c37c49c33d42fa88f664e2315df850 (diff) | |
| download | mullvadvpn-d8ff9aa58ab13f40cc69dbba673d97265c5f8a44.tar.xz mullvadvpn-d8ff9aa58ab13f40cc69dbba673d97265c5f8a44.zip | |
Pass resource dir. when sending problem report
Diffstat (limited to 'mullvad-problem-report')
| -rw-r--r-- | mullvad-problem-report/src/lib.rs | 3 | ||||
| -rw-r--r-- | mullvad-problem-report/src/main.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/mullvad-problem-report/src/lib.rs b/mullvad-problem-report/src/lib.rs index eac0dd4638..af2680efb7 100644 --- a/mullvad-problem-report/src/lib.rs +++ b/mullvad-problem-report/src/lib.rs @@ -253,6 +253,7 @@ pub fn send_problem_report( user_email: &str, user_message: &str, report_path: &Path, + resource_dir: &Path, ) -> Result<(), Error> { let report_content = normalize_newlines( read_file_lossy(report_path, REPORT_MAX_SIZE).map_err(|source| { @@ -274,7 +275,7 @@ pub fn send_problem_report( let mut rpc_manager = runtime .block_on(mullvad_rpc::MullvadRpcRuntime::with_cache( runtime.handle().clone(), - &mullvad_paths::get_resource_dir(), + resource_dir, None, )) .map_err(Error::CreateRpcClientError)?; diff --git a/mullvad-problem-report/src/main.rs b/mullvad-problem-report/src/main.rs index 457133fc49..7090cecd6d 100644 --- a/mullvad-problem-report/src/main.rs +++ b/mullvad-problem-report/src/main.rs @@ -113,7 +113,8 @@ fn run() -> Result<(), Error> { let report_path = Path::new(send_matches.value_of_os("report").unwrap()); let user_email = send_matches.value_of("email").unwrap_or(""); let user_message = send_matches.value_of("message").unwrap_or(""); - send_problem_report(user_email, user_message, report_path) + let resource_dir = mullvad_paths::get_resource_dir(); + send_problem_report(user_email, user_message, report_path, &resource_dir) } else { unreachable!("No sub command given"); } |
