View Issue Details

IDProjectCategoryView StatusLast Update
0000360VisualDifferGeneralpublic2024-01-12 06:14
Reportertkmantis Assigned Toadmin  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.8.7 
Fixed in Version1.8.9 
Summary0000360: Icons associated with folders are not fully copied with "Copy to Right"
DescriptionWhen folders with custom icons are copied with Visual Differ, the custom icons may not appear in the copy when later viewed in the Finder.
Steps To Reproduce1. Create two empty folders, "test" and "test2". Create an empty folder within "test", "FolderWithHDImage". Get info on that folder. Paste a custom graphic over the icon in the Finder. You should end up with something like 1.png

2. In Visual Differ Comparison settings, turn on "Check Resource Forks" (2.png)

3. Run the compare (3.png)

4. In the comparison result, copy "FolderWithHDImage" to the right (4.png)

5. See that it is done within Visual Differ. An Icon file shows on each side (5.png).

6. The Finder does not show the icon correctly in the folder inside of "test2". (6a.png and 6b.png). Why? Did Visual Differ miss a step in the copy process? Copying the folder directly in the Finder does NOT cause this.
Additional InformationWhile I rated this "minor", I hope you can look at it soon, as I have this issue in some data collections that I wish to synchronize. I hope that after you fix this, the tool will be able to detect where it was mishandled before, by doing a new comparison.

Thanks
TagsNo tags attached.

Activities

tkmantis

2023-02-20 04:49

reporter  

6b.png (173,021 bytes)   
6b.png (173,021 bytes)   
6a.png (147,302 bytes)   
6a.png (147,302 bytes)   
5.png (232,905 bytes)   
5.png (232,905 bytes)   
4.png (506,992 bytes)
3.png (106,277 bytes)   
3.png (106,277 bytes)   
2.png (587,953 bytes)
1.png (117,171 bytes)   
1.png (117,171 bytes)   

tkmantis

2023-07-23 04:23

reporter   ~0000752

Any update on this? (I do see it moved to Confirmed status.)

Thanks

tkmantis

2023-11-26 20:15

reporter   ~0000757

I figured out by doing some research why this bug occurs. The following article at eclecticlight.co explains how folder icons work

https://eclecticlight.co/2023/07/25/why-dont-custom-icons-work-properly-in-icloud-drive

Ignore the part about icloud drive, and read the first paragraph under the header "How custom icons work". At the end of that paragraph it states that "there’s also a flag that is set in another xattr, this time of type com.apple.FinderInfo; for folder icons, that’s attached to the folder itself"

When I performed the steps to reproduce the problem that I originally reported, Visual Differ needed to both create the colder containing the icon and copy the file containing the icon image that was within. When Visual Differ created the folder on the right hand side, it did not copy the com.apple.FinderInfo extended attribute from the original corresponding folder on the left side. This extended attribute contained data as follows

xattr -p -x com.apple.FinderInfo "~/Desktop/Copy Test/test/FolderWithHDImage"

00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

That "4" in the data is the bit flag to the Finder that a custom icon should be displayed.

So that brings me to several questions:
1a) Am I correct that when Visual Differ copies a file that it copies ALL of its extended attributes with the file?
1b) Is the answer to question 1a affected by whether I check the option "Check Resource Forks" for the comparison phase?
2) Am I correct that when Visual Differ copies a folder that it copies NONE of the extended attributes of any kind that may be on the folder itself? (I know it does not copy com.apple.FinderInfo as proven by my test.)
3) Can you please fix this bug by ensuring that when Visual Differ has to create a folder during copying of files that the folder has identical extended attributes to the original folder?

Thanks

tkmantis

2023-11-26 21:46

reporter   ~0000758

This article give more information about the com.apple.FinderInfo extended attribute

https://eclecticlight.co/2017/12/19/xattr-com-apple-finderinfo-information-for-the-finder/

A reader comment points out that the Finder Information is documented in the FileInfo and ExtendedFileInfo structures in the CoreServices Framework (CarbonCore>Finder.h>). I also see that there are FolderInfo and ExtendedFolderInfo structs next to FileInfo and ExtendedFileInfo.

admin

2023-12-06 08:40

administrator   ~0000759

Last edited: 2023-12-06 08:41

Maybe I have fixed this bug, this night I implemented the fix and seems to work but it's necessary to do intensive testing.
May you help me? May I send to you a copy of VD with this fix, obviously you are free to say no and I will continue to test myself ;)
If you agree I will send to you the details at the email address used here at bugs.visualdiffer.com

tkmantis

2023-12-06 20:39

reporter   ~0000760

Yes, I would like to test your change. You may send it to me at the email address I registered for this Bug Reporter. Are there other changes being tested in this build, or is the build you are offering to send me have only the one change since the last release build?

Thank you for continuing to work on Visual Differ!

Can you please answer my questions I asked above, restated here...

1a) Am I correct that when Visual Differ copies a file that the current release build copies ALL of its extended attributes with the file?
1b) Is the answer to question 1a affected by whether I check the option "Check Resource Forks" for the comparison phase?
2) Am I correct that when Visual Differ copies a folder that the current release build copies NONE of the extended attributes of any kind that may be on the folder itself? (I know it does not copy com.apple.FinderInfo as proven by my test.)
3) (Revised) Does the bug fix you are working on copy all extended attributes that might be on folders, or just com.apple.FinderInfo?

admin

2023-12-07 06:43

administrator   ~0000762

> Yes, I would like to test your change. You may send it to me at the email address I registered for this Bug Reporter.

Thanks for your help

> Are there other changes being > tested in this build, or is the build you are offering to send me have only the one change since the last release build?

The current version on MAS do not contains this fix

>
> Thank you for continuing to work on Visual Differ!

I'm trying to continue the work but very slowly

>

> Can you please answer my questions I asked above, restated here...
>
> 1a) Am I correct that when Visual Differ copies a file that the current release build copies ALL of its extended attributes with the file?

The current version on Mac App Store do not copy extended attributes
The fix copy all COPYFILE_METADATA attributes using the function copyfile documented here

https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/copyfile.3.html

> 1b) Is the answer to question 1a affected by whether I check the option "Check Resource Forks" for the comparison phase?

The fix does not depend on "Check Resource Forks" flag, the fix copy all attributes only **for directories** (not normal file but only directories)

> 2) Am I correct that when Visual Differ copies a folder that the current release build copies NONE of the extended attributes of any kind that may be > on the folder itself? (I know it does not copy com.apple.FinderInfo as proven by my test.)

Yes, I confirm the current version on Mac App Store do not copy any extended attributes, Apple API requires multiple separated calls to obtain this result

> 3) (Revised) Does the bug fix you are working on copy all extended attributes that might be on folders, or just com.apple.FinderInfo?

The copyfile function copies all attributes but only for directories, maybe I must do for files, too

tkmantis

2024-01-12 02:20

reporter   ~0000765

Thanks for fixing this. You may close it.

admin

2024-01-12 06:13

administrator   ~0000766

thanks for your feedback and patience

Issue History

Date Modified Username Field Change
2023-02-20 04:49 tkmantis New Issue
2023-02-20 04:49 tkmantis Status new => assigned
2023-02-20 04:49 tkmantis Assigned To => admin
2023-02-20 04:49 tkmantis File Added: 6b.png
2023-02-20 04:49 tkmantis File Added: 6a.png
2023-02-20 04:49 tkmantis File Added: 5.png
2023-02-20 04:49 tkmantis File Added: 4.png
2023-02-20 04:49 tkmantis File Added: 3.png
2023-02-20 04:49 tkmantis File Added: 2.png
2023-02-20 04:49 tkmantis File Added: 1.png
2023-03-01 13:01 admin Status assigned => confirmed
2023-07-23 04:23 tkmantis Note Added: 0000752
2023-11-26 20:15 tkmantis Note Added: 0000757
2023-11-26 21:46 tkmantis Note Added: 0000758
2023-12-06 08:40 admin Note Added: 0000759
2023-12-06 08:41 admin Note Edited: 0000759
2023-12-06 20:39 tkmantis Note Added: 0000760
2023-12-07 06:43 admin Note Added: 0000762
2024-01-12 02:20 tkmantis Note Added: 0000765
2024-01-12 06:13 admin Note Added: 0000766
2024-01-12 06:14 admin Status confirmed => closed
2024-01-12 06:14 admin Resolution open => fixed
2024-01-12 06:14 admin Fixed in Version => 1.8.9