mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Fix: Attempted to Patch Filesystem Issues (#32)
This commit is contained in:
@@ -33,12 +33,6 @@ In-Progress:
|
|||||||
- Working on 3D Display Cards
|
- Working on 3D Display Cards
|
||||||
|
|
||||||
- Add Small QOL Animations where Appropriate
|
- Add Small QOL Animations where Appropriate
|
||||||
- Sidebar Animations (C)
|
|
||||||
- Sliding
|
|
||||||
- Hover
|
|
||||||
- Library Animations
|
|
||||||
- Card Hover (C)
|
|
||||||
- Completed/Unread Re-Design
|
|
||||||
- Search Animations
|
- Search Animations
|
||||||
- Card Hover
|
- Card Hover
|
||||||
- SeriesDetail Animations
|
- SeriesDetail Animations
|
||||||
|
|||||||
@@ -53,12 +53,9 @@ fn strip_unc(path: PathBuf) -> PathBuf {
|
|||||||
|
|
||||||
fn resolve_downloads_path(downloads_path: &str) -> PathBuf {
|
fn resolve_downloads_path(downloads_path: &str) -> PathBuf {
|
||||||
if !downloads_path.trim().is_empty() {
|
if !downloads_path.trim().is_empty() {
|
||||||
return PathBuf::from(downloads_path);
|
return PathBuf::from(downloads_path.trim());
|
||||||
}
|
}
|
||||||
let base = std::env::var("XDG_DATA_HOME")
|
suwayomi_data_dir().join("downloads")
|
||||||
.map(PathBuf::from)
|
|
||||||
.unwrap_or_else(|_| dirs::data_dir().unwrap_or_else(|| PathBuf::from("/")));
|
|
||||||
base.join("Tachidesk").join("downloads")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
@@ -674,9 +671,9 @@ fn restart_app(app: tauri::AppHandle) {
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
fn open_path(path: String) -> Result<(), String> {
|
fn open_path(path: String) -> Result<(), String> {
|
||||||
let p = std::path::Path::new(path.trim());
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
{
|
{
|
||||||
|
let p = strip_unc(std::path::PathBuf::from(path.trim()));
|
||||||
std::process::Command::new("explorer")
|
std::process::Command::new("explorer")
|
||||||
.arg(p)
|
.arg(p)
|
||||||
.spawn()
|
.spawn()
|
||||||
@@ -684,6 +681,7 @@ fn open_path(path: String) -> Result<(), String> {
|
|||||||
}
|
}
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
|
let p = std::path::Path::new(path.trim());
|
||||||
std::process::Command::new("open")
|
std::process::Command::new("open")
|
||||||
.arg(p)
|
.arg(p)
|
||||||
.spawn()
|
.spawn()
|
||||||
@@ -691,6 +689,7 @@ fn open_path(path: String) -> Result<(), String> {
|
|||||||
}
|
}
|
||||||
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
|
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
|
||||||
{
|
{
|
||||||
|
let p = std::path::Path::new(path.trim());
|
||||||
std::process::Command::new("xdg-open")
|
std::process::Command::new("xdg-open")
|
||||||
.arg(p)
|
.arg(p)
|
||||||
.spawn()
|
.spawn()
|
||||||
|
|||||||
Reference in New Issue
Block a user