mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-27 11:56:50 -06:00
Two gaps CodeRabbit found in the guard: - `same_file` compared paths, plain and resolved. A second hard link to the file is a different path to the same data, so `convert`, `run --out` and Save As to the link passed the guard and truncated the file. It now asks the file system (same-file: device and inode on Unix, volume and file index on Windows). same-file was already in the lock through walkdir. - `run --in X --out X` checked the tab the script left active. A script that ends on `file.duplicate` or `file.new` leaves a tab with no count of images left in X, so X was written over. The count is now taken when X is opened and checked against `--out` whatever tab is active; the active tab's own file is still checked as before. The script check is a separate function so it can be tested without a file past the 4 GiB budget.