Skip to content

Commit 786477d

Browse files
committed
fix: create test directories
1 parent ea22fe9 commit 786477d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/rattler_menuinst/src/windows.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,21 @@ impl Directories {
8888

8989
/// Create a fake Directories struct for testing ONLY
9090
pub fn fake_folders(path: &Path) -> Directories {
91+
// Prepare the directories
92+
fs::create_dir_all(&path).unwrap();
93+
9194
let terminal_settings_json = path.join("terminal_settings.json");
9295
if !terminal_settings_json.exists() {
9396
// This is for testing only, so we can ignore the result
94-
std::fs::write(&terminal_settings_json, "{}").unwrap();
97+
fs::write(&terminal_settings_json, "{}").unwrap();
9598
}
99+
96100
let start_menu = path.join("Start Menu");
97101
fs::create_dir_all(&start_menu).unwrap();
102+
98103
let quick_launch = Some(path.join("Quick Launch"));
99104
fs::create_dir_all(quick_launch.as_ref().unwrap()).unwrap();
105+
100106
let desktop = path.join("Desktop");
101107
fs::create_dir_all(&desktop).unwrap();
102108

0 commit comments

Comments
 (0)