mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-30 15:35:33 +02:00
feat: add tauri-plugin-opener (#2019)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
#[allow(deprecated)]
|
||||
use crate::open::Program;
|
||||
use crate::process::Command;
|
||||
|
||||
@@ -201,6 +202,7 @@ impl OpenScope {
|
||||
///
|
||||
/// The path is validated against the `plugins > shell > open` validation regex, which
|
||||
/// defaults to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`.
|
||||
#[allow(deprecated)]
|
||||
pub fn open(&self, path: &str, with: Option<Program>) -> Result<(), Error> {
|
||||
// ensure we pass validation if the configuration has one
|
||||
if let Some(regex) = &self.open {
|
||||
|
||||
Reference in New Issue
Block a user