Bug 440182 - Copy/Move extended file attributes.
Summary: Copy/Move extended file attributes.
Status: RESOLVED WORKSFORME
Alias: None
Product: krusader
Classification: Applications
Component: general (other bugs)
Version First Reported In: Git
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-23 10:43 UTC by vkyxurpmvfubjefphl
Modified: 2021-08-30 04:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vkyxurpmvfubjefphl 2021-07-23 10:43:06 UTC
SUMMARY
At the time of writing and using current git version at the time of writing, copying and moving files completely ignores extended file attributes (such as user.xdg.tags, the ones Dolphin and the tags: kioslave utilize, or user.xdg.origin.url).
Sadly, I found out when I needed to find the xdg.origin.url of a file to be able to find a server used by a recently deceased colleague, and to my horror, having moved it using Krusader completely wiped out that url, that will never be found again.

STEPS TO REPRODUCE
1. Create tags with Dolphin, or set extended file attributes with setfattr.
2. Move or copy the file.
3. Resulting file will not preserve any of the extended file attributes.

OBSERVED RESULT
Tags or other metadata stored as xattr will not be copied, or "destroyed" when a file is moved.

EXPECTED RESULT
Files should retain that data.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: Ubuntu 21.04 (64b) Kernel 5.11.0.25-generic
(available in About System)
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
While some can argue having information like download url or tags in files could be considered a security risk, it's trivial to wipe them out on demand, while it's impossible to restore them if they are lost by just copying or moving from Krusader.
Comment 1 Toni Asensi Esteve 2021-07-31 17:29:12 UTC
Hello,

Thanks for reporting. Does the problem also happen copying files with Dolphin?

> STEPS TO REPRODUCE
> 1. Create tags with Dolphin, or set extended file attributes with setfattr.
> 2. Move or copy the file.
> 3. Resulting file will not preserve any of the extended file attributes.        

With Dolphin I added a "labelTest" tag to an "example.txt" file under Kubuntu 21.04, I used F5 in the git version of Krusader to copy that file to the same folder, and the resulting file "example2.txt" had the same attributes:

    $ getfattr -d example.txt
    # file: example.txt
    user.xdg.tags="labelTest"

    $ getfattr -d example2.txt 
    # file: example2.txt
    user.xdg.tags="labelTest"

Is that what you expected?

Note: 
- That didn't work under Kubuntu 20.04, maybe because [Please add Extended Attribute support (setxattr, getxattr)](https://bugs.kde.org/show_bug.cgi?id=116617) still was a problem there.

Using an updated Kubuntu 21.04, in About System I saw:
    Operating System: Kubuntu 21.04
    KDE Plasma Version: 5.21.4
    KDE Frameworks Version: 5.80.0
    Qt Version: 5.15.2
    Kernel Version: 5.11.0-25-generic
    OS Type: 64-bit
not the 
    KDE Plasma Version: 5.22.3
    KDE Frameworks Version: 5.84.0            
that you report. Do you have some special configuration?
Comment 2 Bug Janitor Service 2021-08-15 04:36:02 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2021-08-30 04:36:27 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!