mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 03:14:56 +08:00
Compare commits
1 Commits
main
...
9b8d3cc196
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b8d3cc196 |
6
.github/workflows/build-test.yml
vendored
6
.github/workflows/build-test.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
build-date: ${{ steps.version.outputs.build-date }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
@@ -276,7 +276,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
|
||||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
@@ -63,7 +63,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
@@ -147,7 +147,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
|
||||
4
.github/workflows/i18n-check.yml
vendored
4
.github/workflows/i18n-check.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -169,7 +169,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
version-type: ${{ steps.check.outputs.version-type }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
tag: ${{ steps.version.outputs.tag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
if: github.event_name != 'workflow_dispatch' || inputs.version != ''
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Ensure jq and grep are installed
|
||||
run: sudo apt-get update && sudo apt-get install -y jq
|
||||
@@ -253,7 +253,7 @@ jobs:
|
||||
tag: ${{ steps.tag.outputs.tag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -320,7 +320,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
@@ -485,7 +485,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@nightly
|
||||
@@ -608,7 +608,7 @@ jobs:
|
||||
if: always() && needs.build.result == 'success' && needs.changelog.result == 'success'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Download changelog
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -643,7 +643,7 @@ jobs:
|
||||
if: always() && needs.publish.result == 'success'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Get release version
|
||||
id: version
|
||||
|
||||
@@ -204,23 +204,6 @@ pub async fn create_rclone_mount_remote_process(
|
||||
let rclone_conf_path =
|
||||
get_rclone_config_path().map_err(|e| format!("Failed to get rclone config path: {e}"))?;
|
||||
|
||||
// Extract mount point from args and create directory if it doesn't exist.
|
||||
// The mount point is the second non-flag argument (first is remote:path).
|
||||
let args_vec = split_args_vec(config.args.clone());
|
||||
let mount_point_opt = args_vec.iter().filter(|arg| !arg.starts_with('-')).nth(1); // 0th is remote:path, 1st is mount_point
|
||||
|
||||
if let Some(mount_point) = mount_point_opt {
|
||||
let mount_path = Path::new(mount_point);
|
||||
if !mount_path.exists()
|
||||
&& let Err(e) = fs::create_dir_all(mount_path)
|
||||
{
|
||||
return Err(format!(
|
||||
"Failed to create mount point directory '{}': {}",
|
||||
mount_point, e
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
let api_key = get_api_key();
|
||||
let port = get_server_port();
|
||||
let mut args: Vec<String> = vec![
|
||||
@@ -228,7 +211,7 @@ pub async fn create_rclone_mount_remote_process(
|
||||
"--config".into(),
|
||||
rclone_conf_path.to_string_lossy().into_owned(),
|
||||
];
|
||||
args.extend(args_vec);
|
||||
args.extend(split_args_vec(config.args.clone()));
|
||||
|
||||
let config = ProcessConfig {
|
||||
id: config.id.clone(),
|
||||
@@ -328,10 +311,9 @@ pub async fn get_mount_info_list(
|
||||
Ok(is_mounted) => {
|
||||
if process.is_running {
|
||||
if is_mounted { "mounted" } else { "mounting" }
|
||||
} else if is_mounted {
|
||||
"unmounting"
|
||||
} else {
|
||||
// If process is not running, the mount point should be considered
|
||||
// unmounted regardless of whether
|
||||
// the directory exists or not
|
||||
"unmounted"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user