Create start-menu author shortcut directory if not exists

This commit is contained in:
Caelan Sayler
2024-11-07 20:47:55 +00:00
committed by Caelan
parent e924fb4d69
commit 48e92759e6

View File

@@ -180,6 +180,16 @@ unsafe fn unsafe_update_app_manifest_lnks(next_app: &VelopackLocator, previous_a
continue;
}
};
if flag == ShortcutLocationFlags::START_MENU {
if let Some(parent) = path.parent() {
if let Err(e) = std::fs::create_dir_all(&parent) {
error!("Failed to create parent directory for shortcut: {}", e);
continue;
}
}
}
info!("Creating new shortcut for flag '{:?}' ({:?}).", path, flag);
match Lnk::create_new() {