From 6c0f600cc6dcb22b3990283aa5d3d7593da6bbb5 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:19:38 +0100 Subject: refactor: Fix PR downloads permission issue (#217) * fix: Download PRs into Titanfall2 folder Avoids any folder write permission issues * fix: Download Mod PRs into Titanfall2 folder Avoids any folder write permission issues * build: Add libraries for zip extract * refactor: Download mods zip into memory and extract it from there directly into Titanfall2 dir * fix: Stop creating unneeded temp download folder * refactor: Download launcher zip into memory and extract it from there into a temp folder then only copy out necessary files and delete the rest * docs: Add comment * refactor: Remove unused functions * fix: Smoothly handle misformatted zip file Usually caused by the downloaded file not actually being a zip Catches the error and displays error message if it occurs. * feat: Exit early if download was unsuccessful * chore: Remove leftover commented out code * fix: Write mod files into correct subdirectory Was writing them into parent instead by accident which meant that Northstar wouldn't actually find it. * refactor: Define profile path once Instead of recreating the string everytime --- src-tauri/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src-tauri/Cargo.toml') diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index fafad444..a6142cea 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -54,6 +54,8 @@ chrono = "0.4.23" ts-rs = "6.1" # const formatting const_format = "0.2.30" +# Extracting zip files easily +zip-extract = "0.1.2" [features] # by default Tauri runs in production mode -- cgit v1.2.3