mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix(updater): set tmp folder permissions (#4311)
This commit is contained in:
committed by
GitHub
parent
123d46a715
commit
b77877fd2c
5
.changes/updater-tmp-folder-permission.md
Normal file
5
.changes/updater-tmp-folder-permission.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Set permission to `0o700` for the tmp folder used to move the current AppImage on the updater process.
|
||||
@@ -641,9 +641,13 @@ impl<R: Runtime> Update<R> {
|
||||
#[cfg(feature = "updater")]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn copy_files_and_run<R: Read + Seek>(archive_buffer: R, extract_path: &Path) -> Result {
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
let tmp_dir = tempfile::Builder::new()
|
||||
.prefix("tauri_current_app")
|
||||
.tempdir()?;
|
||||
let mut perms = std::fs::metadata(tmp_dir.path())?.permissions();
|
||||
perms.set_mode(0o700);
|
||||
std::fs::set_permissions(tmp_dir.path(), perms)?;
|
||||
|
||||
let tmp_app_image = &tmp_dir.path().join("current_app.AppImage");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user