I'm running rclone copy where the source is a Mac, and the destination is a Mac (configured as an sftp remote).
I'm copying folders which have custom icons - i.e. a hidden "Icon?" file is in the folder. After copying completes, those files on the destination are named "Icon␍" instead, and have a file size of 0.
Is there a way to use rclone copy so these files are copied correctly, and the folders on the destination get their custom icons? Thanks!
You could manage probably the ? issue with tweaking encoding but it won't fix your problem. rclone and sftp do not support extended attributes which are needed for Icon? magic to work on macOS.
BTW. If these are two local Macs I think easier would be to use SMB folder sharing instead of rclone. If they are remote you could try program like syncthing (I think it handles ext attr well)
I thought that the attributes appeared as separate files (apple double format) which could be synced by rclone, but I'm probably wrong about that!
@mstgrv how are you seeing the ␍? If it is via rclone then that is how it will show those Icon files as they have a carriage return on the end of the name. I think an rclone copy via sftp from mac should preserve the file names as there shouldn't be any encoding in use.
What does
rclone help flags local-encoding
say? I'm interested in what the defaults are like this
--local-encoding MultiEncoder The encoding for the backend (default Slash,Dot)
The ␍ does show in rclone's log output on the commandline but it also appears that way in Finder itself on the destination after a copy. Screenshots for you below of the source (which you can see has its custom folder icon, and the "Icon?" file is 63kb in size) and the destination after the copy (which lacks the custom icon, and has the renamed "Icon␍" which is 0kb in size)
Source:
Destination:
@kapitainsky I've used syncthing in the past and it's great, but I still think rclone has unique commands and use cases (e.g. rclone check --one-way) that are very handy to have when want to do a specific thing on the commandline, with quick results. It can be a supplement to syncthing.
It says:
# Backend Flags
Backend only flags. These can be set in the config file also.
--local-encoding MultiEncoder The encoding for the backend (default Slash,InvalidUtf8,Dot)
What progress do you expect? rclone as for today does not handle extended attributes well. If it is something you think is important any help is welcomed. All project is open source.
I am afraid that there is gazillion of other things to fix before to worry about some missing folder icon. Said that I am sure that if you provide solution it can be included easily.