Diffusion Ark 051ebb748c96

Implement PreservePaths option

Authored by elvisangelaccio on Mar 1 2016, 4:11 PM.

Description

Implement PreservePaths option

unar does not have a dedicated switch to signal whether to preserve the paths while
extracting. Even if it had it, we could not use it since we cannot run unar in interactive mode
(i.e. when files already exist we cannot use its overwrite prompt).

Since we always extract to a temporary directory, we can workaround this
limitation by moving the files by hand. We just need to make sure to remove all
the directories from the filenames.

Since we introduce a dedicated function, we can use it when preserving paths as
well, instead of relying on CliInterface::moveToFinalDest (which is meant for drag-and-drop extractions).

This new function also paves the way for task T1686.

Details

Committed
elvisangelaccioMar 1 2016, 4:11 PM
Parents
R36:786bc745decb: Move rar tests to cliunarchiver plugin
Branches
Unknown
Tags
Unknown
References
feature/unarchiver