GUI 档案管理器文件滚动器是否自动使用“-p”选项(保留权限)来创建 tar 和 tar.gz 档案?
(GNOME 文档中没有提到)
答案1
是的,根据这个错误报告以及自 2.15.91 版本以来的来源:
fr_command_tar_add (FrCommand *comm,
const char *from_file,
GList *file_list,
const char *base_dir,
gboolean update,
gboolean follow_links)
{
FrCommandTar *c_tar = FR_COMMAND_TAR (comm);
GList *scan;
fr_process_set_out_line_func (FR_COMMAND (comm)->process,
process_line__add,
comm);
begin_tar_command (comm);
fr_process_add_arg (comm->process, "--force-local");
fr_process_add_arg (comm->process, "--no-recursion");
fr_process_add_arg (comm->process, "--no-wildcards");
fr_process_add_arg (comm->process, "-v");
fr_process_add_arg (comm->process, "-p");
最后一行是最重要的。也在 NEWS 文件中:
version 2.15.91
----------------
* Fixed bug #343739 – Seems to not escape file names correctly.
* Fixes bug #340050 – tar permissions are not preserved.
源代码来自 3.12.1 版本,并且这些行仍然存在。