Fixing files marked as stuck as partially transferred in Finder

Very rough note, but if I don’t write it down, no one else will find it. A friend was dealing with an issue where she interrupted a file transfer of many files and directories to an SMB share on macOS and transferred it via other means. However, macOS thought the files were still in a partially transferred state to be resumed. There was no obvious way to tell Finder that it was OK.

It seems that clearing a file’s extended attributes can clear this out. A quick way to remove all extended attributes from everything in the current directory:

shopt -s globstar
xattr -c **

Be careful with this – you might have files that do need the extended attributes. In this case, it wasn’t needed. Read on for the theory on why this might work and the specific attribute that might be a problem.

Continue reading

Files with accents not showing from an SMB share on macOS

I recently had an issue where some files with accents were showing, but not all of them. If none of them were showing, I might have assumed an encoding issue, but it’s clear something else was at play here. This was pretty annoying when I wanted to play a specific song.

As it turns out, on macOS, it’s almost certainly a Unicode normalization issue, where Apple is (unnecessarily) strict about Unicode. I seem to keep running into these issues on macOS – I first into it trying to notarize a zip file. Luckily, there’s a tool that can handle this for you.

Continue reading