Dr-Emann / applesauce

Transparent compression for Apple File System Compression (AFSC)
GNU General Public License v3.0
21 stars 0 forks source link

Passing a file which resides on another volume fails to create temp dir _inside_ the file #52

Closed akrabu closed 7 months ago

akrabu commented 7 months ago

Using the new v0.4.6, I noticed when I drag a bunch of folders and files, I'll get an error. It seems to only want folders now. It used to be able to work with whatever I threw at it. Seems like it's trying to make a temp file inside the ISO file for some reason.

I basically ran it like:

applesauce compress /path/to/folder /path/to/folder /path/to/isofile /path/to/folder

Removing the ISO from the mix made it work.

thread 'main' panicked at /Users/runner/work/applesauce/applesauce/crates/applesauce/src/threads/mod.rs:146:57:
called `Result::unwrap()` on an `Err` value: Custom { kind: NotADirectory, error: PathError { path: "/Volumes/D8-6_SnapRAID/Backup/Scan.iso/applesauce_tmpvita9t", err: Os { code: 20, kind: NotADirectory, message: "Not a directory" } } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Dr-Emann commented 7 months ago

Thanks for the report!

Looks like the issue is actually caused by referring to a file on an external volume, when trying to create a temp directory on the same device, it tries to create a directory under the passed path.

Should be fixed by v0.5 which is building now, which will instead create a temporary directory in the parent directory if a file is passed directly.

akrabu commented 7 months ago

Awesome, thanks for the quick fix!

Update: Confirmed working 👍