MacOS – com.apple.quarantine extended attribute gets re-added each time I open the file

command linemacos

I have a file called tasks.taskpaper that I associated with FoldingText. When I open the file, the dialog pops up with text

“tasks.taskpaper” may be a script application. It was created by
FoldingText and will be opened by FoldingText. Are you sure you want
to open it?

And, indeed, the com.apple.quarantine extended attribute is associated with the file:

$ xattr -l tasks.taskpaper | grep com.apple.quarantine
com.apple.quarantine: 0002;53b0afc9;FoldingText;

I can remove the attribute:

$ xattr -d com.apple.quarantine tasks.taskpaper
$ xattr -l tasks.taskpaper | grep com.apple.quarantine
$

But when I open the file with FoldingText again, I get the popup dialog again, and the attribute has somehow been re-added to the file:

$ xattr -l tasks.taskpaper | grep com.apple.quarantine
com.apple.quarantine: 0002;53b0b0dc;FoldingText;

How can I get this to stop happening?

Note that I'm running on Mavericks and I installed FoldingText (2.0.2) using the App Store. Also, the file is in a Dropbox directory.

Best Answer

You need to add the direct path to the file in your command to remove it permanently:

xattr -d com.apple.quarantine /complete/path/to/tasks.taskpaper

If this fails, there may be multiple instances. Attempt to globally remove it amongst all versions:

find . -iname '*.taskpaper' -print0 | xargs -0 xattr -d com.apple.quarantine