Skip to content

Commit c4d1397

Browse files
committed
fix: use actual path instead of just filename
1 parent a8834b8 commit c4d1397

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/cleanup_modules/device_cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Dumper for DeviceDumper {
159159
let file_path =
160160
get_path_to_dump(state, "devices.json").into_module_report(DEVICE_MODULE_NAME)?;
161161
let dump_file = create_dump_file(&file_path).into_module_report(DEVICE_MODULE_NAME)?;
162-
let file_name = file_path.file_name().unwrap().to_string_lossy();
162+
let file_name = file_path.as_path().to_str().unwrap();
163163

164164
if devices.is_empty() {
165165
println!("No devices to dump");

src/cleanup_modules/driver_cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl Dumper for DriverDumper {
133133
let file_path =
134134
get_path_to_dump(state, "drivers.json").into_module_report(DRIVER_MODULE_NAME)?;
135135
let dump_file = create_dump_file(&file_path).into_module_report(DRIVER_MODULE_NAME)?;
136-
let file_name = file_path.file_name().unwrap().to_string_lossy();
136+
let file_name = file_path.as_path().to_str().unwrap();
137137

138138
if drivers.is_empty() {
139139
println!("No drivers to dump");

src/cleanup_modules/driver_package_cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Dumper for DriverPackageDumper {
159159
let file_path =
160160
get_path_to_dump(state, "driver-packages.json").into_module_report(MODULE_NAME)?;
161161
let dump_file = create_dump_file(&file_path).into_module_report(MODULE_NAME)?;
162-
let file_name = file_path.file_name().unwrap().to_string_lossy();
162+
let file_name = file_path.as_path().to_str().unwrap();
163163

164164
if driver_packages.is_empty() {
165165
println!("No driver packages to dump");

0 commit comments

Comments
 (0)