Skip to content

Commit

Permalink
Allow whitespace in profile names
Browse files Browse the repository at this point in the history
  • Loading branch information
Kesomannen committed May 23, 2024
1 parent 1980f85 commit 8328f39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ fn logger_setup(app: &AppHandle) -> anyhow::Result<()> {
}

fn main() {


if !cfg!(target_os = "linux") {
// doesn't work on linux for some reason :/
tauri_plugin_deep_link::prepare("com.kesomannen.modmanager");
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ struct Profile {

impl Profile {
fn is_valid_name(name: &str) -> bool {
name.chars().all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_')
name.chars().all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_' || c == ' ')
}

fn get_mod<'a>(&'a self, uuid: &Uuid) -> Result<&'a ProfileMod> {
Expand Down
4 changes: 3 additions & 1 deletion src-tauri/src/manager/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ pub mod updater;
pub fn setup(app: &AppHandle) -> Result<()> {
app.manage(Mutex::new(InstallState::default()));

tauri_plugin_deep_link::register("ror2mm", deep_link_handler(app.clone()))?;
if !cfg!(target_os = "linux") {
tauri_plugin_deep_link::register("ror2mm", deep_link_handler(app.clone()))?;
}

Ok(())
}
Expand Down

0 comments on commit 8328f39

Please sign in to comment.