Ticket #2254 (closed defect: fixed)

Opened 9 years ago

Last modified 7 years ago

in dialog "Copy File" not mark checkbox "preserve Attributes" for filesystem mount with FUSE (sshfs)

Reported by: igor_b Owned by: slavazanko
Priority: major Milestone: 4.7
Component: mc-core Version: master
Keywords: Cc: zaytsev, smirta@…
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master committed-stable

Description

If I copy the files to the partition mounted with sshfs, the default checkbox "preserve Attributes" is unchecked. I figured out the problem and find solution, which have listed below in the patch. I hope you analyze and include changes in future versions.

Thank you for your work.

Attachments

filegui.c.diff (626 bytes) - added by igor_b 9 years ago.
patch for normalize work dialog copy files to part mount with sshfs

Change History

Changed 9 years ago by igor_b

patch for normalize work dialog copy files to part mount with sshfs

comment:1 Changed 9 years ago by zaytsev

  • Cc zaytsev added

comment:2 follow-up: ↓ 4 Changed 9 years ago by zaytsev

I think there were already some tickets about the behavior of the "preserve Attributes" checkbox. I don't remember what the solution was, but guys, what is happening right now sucks.

I have recently backed up a huge archive to FAT32 and the checkbox was unchecked by default. At first I didn't notice this and the dates of the files were completely reset. I have checked it manually and then it copied everything correctly without any errors. So why in the world it's unchecked by default for FAT32 if it works correctly anyway?

Maybe we can throw this auto-detection "feature" away and instead provide better error handling options for the copy dialog (e.g. ignore all subsequent errors)?

Could anybody please explain how the autodetection works right now and why there's a need for it at all?

comment:3 Changed 9 years ago by zaytsev

See:

#119 --- introduced auto-detection, the way it works was not documented

#392 --- request for an option in the copy/move dialogs to provide more flexible error handling, not implemented yet

#1639 --- request for an option to remember the default state for PA, not implemented yet

comment:4 in reply to: ↑ 2 Changed 9 years ago by igor_b

Replying to zaytsev:

Could anybody please explain how the autodetection works right now and why there's a need for it at all?

In the original file were wrong variable name NTFS_3G_MAGIC = 0x65735546, in fact, this value applies to all file systems mounted using FUSE.
Some systems, mounted with FUSE support for maintaining the attributes (partially or completely), and some do not. For example, when mounting the file system mobile phone via FUSE checkbox "preserve Attributes" should be unchecked, because otherwise when you copy will be errors. But for sshfs "preserve Attributes" should be unchecked, or else all executable files will be noexecutable after copy.
But it is better to remove mark manually copied to a mobile phone than do not forget to set when copying to sshfs (IMHO).

comment:5 Changed 9 years ago by zaytsev

Igor, do I understand correctly that basically the autodetection was introduced to avoid errors on setting permissions / attributed for those systems that do not support it or not?

If this is indeed the case, why we need autodetection at all? Why isn't it better to have an option in the copy/move dialog along the lines of "ignore all further errors on setting attributes" and remove autodetection + have preserve attributes to remember it's last state?

comment:6 Changed 9 years ago by igor_b

Perhaps as you suggest - actually better. You are asking me to do?

comment:7 Changed 9 years ago by zaytsev

I am asking for the opinions of all the parties involved, and, among others, your opinion. If you think that it's a good idea and are willing to provide a patch, it's even better. It's nice to close 4 tickets with one branch :)

comment:8 Changed 9 years ago by igor_b

I will develop as time will

comment:9 Changed 8 years ago by Saha

  • Cc smirta@… added
  • Version 4.7.2 deleted

Please remove NTFS_3G_MAGIC as a temporary solution of the problem because it is really better when the check-box "Preserve Attributes" is checked by default on FUSE systems than when I always should check it (the problem appears in GlusterFS too).

comment:10 Changed 8 years ago by andrew_b

  • Version set to master

comment:11 Changed 7 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted
  • Branch state set to no branch

comment:12 Changed 7 years ago by slavazanko

  • Branch state changed from no branch to on review

Created branch 2254_fuse_preserve_attributes

Initial changeset:51678b6b0e3257ae72c0835cc7a0009546f27bbc

Review, please.

comment:13 Changed 7 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:14 Changed 7 years ago by andrew_b

  • Votes for changeset changed from slavazanko to slavazanko andrew_b
  • Branch state changed from on review to approved

comment:15 Changed 7 years ago by slavazanko

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko andrew_b to committed-master committed-stable
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to stable:

git log --pretty=oneline eb8e2b7..4d810c7

commits: 4d810c702bc9cb221135aa63f0a2405bc3f4a0a0, 51678b6b0e3257ae72c0835cc7a0009546f27bbc

Rebased and merged to master:

git show --pretty=oneline 41712de..2e895e3
Last edited 7 years ago by angel_il (previous) (diff)

comment:16 Changed 7 years ago by slavazanko

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.