mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
fix dialog clicking
This commit is contained in:
@@ -22,4 +22,9 @@ pub fn rename(path: String, new_name: String) {
|
||||
#[tauri::command]
|
||||
pub fn dir_exists(path: &str) -> bool {
|
||||
return fs::metadata(&path).is_ok();
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn dir_is_empty(path: &str) -> bool {
|
||||
return fs::read_dir(&path).unwrap().count() == 0;
|
||||
}
|
||||
@@ -56,6 +56,7 @@ fn main() {
|
||||
unzip::unzip,
|
||||
file_helpers::rename,
|
||||
file_helpers::dir_exists,
|
||||
file_helpers::dir_is_empty,
|
||||
downloader::download_file,
|
||||
downloader::stop_download,
|
||||
lang::get_lang,
|
||||
|
||||
Reference in New Issue
Block a user