46 Commits

Author SHA1 Message Date
tommady
dd34293ce8
scaffold close-issue-825
Signed-off-by: tommady <tommady@users.noreply.github.com>
2025-05-18 06:00:51 +00:00
Amyspark
07967927dd
feat: Make bzip3 optout (#814)
Co-authored-by: João Marcos <marcospb19@hotmail.com>
2025-05-03 20:43:59 -03:00
tommady
1ff1932e3d
Merge folders in decompression (#798)
Signed-off-by: tommady <tommady@users.noreply.github.com>
2025-05-01 04:20:33 -03:00
Talison Fabio
31dd9eb923
feat: Add rename option in overwrite menu (#779)
* feat: Add generic Choice prompt implementation

* feat: use ChoicePrompt in user_wants_to_continue method

* feat: add "rename" option in ask_to_create_file method

* feat: check accessible mode for choises prompt

* feat: rename file in "ask_to_create_file" rename action

* feat: create "resolve_path" for smart_unpack to deal with rename

* feat: use resolve_path instead clear_path in smart_unpack

* fix: remove unused clear_path function

* chore: cargo fmt

* Add docs

* refactor: rename "resolve_path" method

* chore: fix ChoicePrompt doc

* doc: improve doc of resolve_path_conflict

* fix: out of bound when type answer bigger than some choice

* doc: improve rename_path docs

* chore: cargo fmt

* chore: revert user_wants_to_continue

* fix: update error message when find EOF in choise prompt response

* revert: update message error in ChoicePrompt instead Confirmation

* test: add overwrite and cancel tests

* test: Add rename test with "allow_piped_choice" new feature

* cargo fmt

* test: create test for autoincrement new renamed files
2025-03-30 19:19:21 -03:00
ttyS3
22d4e0faf0 chore: add comments about RAR 4.x and 5.0 signature 2024-12-02 12:34:48 -03:00
João Marcos P. Bezerra
df6d2cea98 tweak: don't add period to end of each log 2024-11-18 00:32:17 -03:00
João Marcos P. Bezerra
639ef19fbc chore: simplify code after feature stabilization
no need to reimplement `Path::is_symlink` anymore
2024-11-17 21:21:58 -03:00
Jonas Frei
ba9f9c00f3 Add support for bzip3
Closes #398
Signed-off-by: Jonas Frei <freijon@pm.me>
2024-11-17 14:50:02 -03:00
Ryan Roden-Corrent
77c1a4e9db Support decompressing stdin.
Fixes #687.

If "-" is passed as a filename, decompress data from stdin.

Currently `--format` must be passed as well, but as a next step,
we could try to infer the format from magic numbers.

As stdin is not connected to the terminal, we cannot prompt for Y/N
when warning about decompression in memory, for e.g. zip. Just default
to No, and require passing "-y" in these cases.

For zip, we have to buffer the whole stream in memory to seek into it,
just as we do with a chained decoder like `.zip.bz`.

The rar format requires an actual file (not an `impl Read`), so
we write a temp file that it can decode.

When decoding a single-file archive (e.g. file.bz), the output filename
is just `-`, since we don't know the original filename. I had to add
a bit of a hack to the tests to work around this. Another option
would be to interpret "-d" as a destination filename in this case.

When decoding a multi-file archive, I decided to unpack directly into
the destination directory, as this seemed like a better experience than
adding a top-level "-" folder inside the destination.
2024-08-26 03:40:52 -03:00
João Marcos P. Bezerra
28daa9e8c4 make logger channel static 2024-04-01 10:58:35 -03:00
João Marcos P. Bezerra
bed8ea0276 create Logger::info_accessible 2024-04-01 10:58:35 -03:00
Antonios Barotsis
1e56bb8f1f Improve logging interface 2024-04-01 10:58:35 -03:00
Antonios Barotsis
380893b6df Add levels and fix output 2024-04-01 10:58:35 -03:00
Antonios Barotsis
e2ac5c4c9b Make all info logs use the new system 2024-04-01 10:58:35 -03:00
misilelab
db0bc8a7d9 impl except test 2023-11-25 21:33:22 -03:00
Łukasz Krawiec
dade163243 added support for listing and decompressing .rar archives 2023-11-15 08:59:00 -03:00
Vinícius R. Miguel
2caeb1004c refac: add support for Windows in EscapedPathDisplay 2023-01-05 13:39:06 -03:00
Vinícius R. Miguel
0deb18289a refac: use BStr to display possibly non-UTF8 byte sequences 2023-01-05 12:46:29 -03:00
João M. Bezerra
e8d0914a01 improve error message when compressing folder with single-file formats 2022-10-17 00:03:44 -03:00
figsoda
13fab6d241 remove progress feature 2022-10-15 23:03:20 -04:00
João M. Bezerra
4d2ccf4873 create remove_file_or_dir util 2022-10-15 21:51:52 -03:00
figsoda
51855948f1 add OutputLine trait for performance improvements 2022-10-13 11:31:43 -04:00
figsoda
5dc8d3efed fix: apply clippy lints 2022-10-03 20:56:48 -04:00
João M. Bezerra
2e165e57cb fix rustdoc lint warnings 2022-06-05 12:52:20 -03:00
João M. Bezerra
14025c6816 remove use_small_heuristics = "Max" from rustfmt
and update edition to 2021
2022-06-04 13:06:52 -03:00
João Marcos Bezerra
9c3446924c
Merge pull request #224 from sigmaSd/sym
Ignore broken symlinks when compressing
2021-12-09 01:06:34 -03:00
Nbiba Bedis
734ffd4331 Compile on stable 2021-12-08 11:58:02 +01:00
figsoda
52a8acf2e1 support snappy format 2021-12-07 13:59:56 -05:00
Nbiba Bedis
0976970e8c Add progress bar for compressing/decompressing 2021-11-25 11:57:47 +01:00
João M. Bezerra
4e0dbeb85b Merge branch 'accessibility' 2021-11-24 23:39:00 -03:00
Anton Hermann
1030eb0de9 Improve accessibility code and comment decisions why some info is (in)accessible 2021-11-23 11:53:20 +01:00
João Marcos Bezerra
fe4b265d9f
Merge branch 'master' into infer2 2021-11-14 02:11:28 -03:00
Vinícius Rodrigues Miguel
afc8367230 Simplify (optimize?) several file inferring functions 2021-11-14 01:53:59 -03:00
Nbiba Bedis
08b2314d8f display xz when inferring lzma 2021-11-13 17:13:51 +01:00
Nbiba Bedis
0660c2fe59 Remove Lzip because its incorrect, and improve extention comparison 2021-11-13 09:46:08 +01:00
Anton Hermann
c1add95e70 Fix warnings in doc comments
Escape square brackets comments containing "[INFO]", "[WARNING]", "[ERROR]"

Suppress automatic link markup warning
2021-11-13 00:07:17 +01:00
Spyros Roum
c33d896743 Change clear_path to return Result<bool>
So `Ok(true)` means the path is clear while `Ok(false)` means the user doesn't want to overwrite
2021-11-11 15:58:51 +02:00
Spyros Roum
eb9a99fff3 Create util for clearing a path 2021-11-11 11:36:26 +02:00
João M. Bezerra
a531d44e2b Move colors module to it's own file 2021-11-10 09:55:44 -03:00
João M. Bezerra
d27e259b26 Reorganizing src/utils, by renaming submodules
And moving formatting stuff out of fs.rs
2021-11-10 09:51:26 -03:00
João M. Bezerra
cbc87866fa Fix zip magic numbers detection
And reworked detection for other formats as well
2021-11-10 06:34:05 -03:00
João M. Bezerra
16acb98b6e Early return when can't detect extension from magic numbers 2021-11-10 06:04:31 -03:00
João M. Bezerra
552096acf0 Minor import and module exporting changes 2021-11-10 06:03:46 -03:00
Nbiba Bedis
266cf6e27a Infer file extension when decompressing 2021-11-10 05:41:44 -03:00
Vinícius Miguel
43fb274956
Optimize strip_cur_dir (#167) 2021-11-05 23:49:35 -04:00
Vinícius Miguel
739a52f00e
Refactor utils into a module (#166) 2021-11-05 22:04:00 -04:00