doublecmd icon indicating copy to clipboard operation
doublecmd copied to clipboard

.gz file not add file

Open Liuzhj opened this issue 1 year ago • 3 comments

Version

Double Commander Version: 1.2.0 alpha Revision: 11284 Commit: 1ee04fc7c Build date: 2024/04/08 Lazarus: 3.99.0.0 FPC: 3.2.2 Platform: aarch64-Darwin-cocoa OS version: Mac OS X 14.1.0

Description

open .gz ,copy other file into .gz, not add file , actually is append content to exists file . It's a bug, please fix it, thank you .

Liuzhj avatar Apr 17 '24 06:04 Liuzhj

Gzip archive can store only one file. But Gzip archive can contain a multiply (concatenated) streams which are extracted as one file. When you copy file into Gzip archive then it added as an additional stream. So it is not a bug, it is a feature. But I am agree that it looks strange.

alexx2000 avatar Apr 17 '24 17:04 alexx2000

Gzip archive can store only one file. But Gzip archive can contain a multiply (concatenated) streams which are extracted as one file. When you copy file into Gzip archive then it added as an additional stream. So it is not a bug, it is a feature. But I am agree that it looks strange.

got it .

Liuzhj avatar Apr 18 '24 15:04 Liuzhj

I beleive the name of this issue has to be changed to "gz plugin does not ask about overwriting the gz file when packing"

To understand the issue it is the best just to check how gzip behaves: image image image image So we can assume, that the most logic solution to the current bug would be to make gz plugin to ask when copying any file into gz "Do you wish to overwrite?" and if yes, then not to add the stream, but to delete the existing gz file and repack the new file into gz inheriting the name from the deleted gz.

lprot avatar May 11 '24 06:05 lprot