I have an installed directory to access some images. When you first open an image with, open /mounted_dir/foo.jpgit opens the image in preview mode. When repeating the same command, it gives an error:
/mounted_dir/foo.jpg is damaged and can't be opened. You should move it to the Trash.
I saw this error message on the Internet, but only for applications and not for image files. In addition, this file is not corrupted, for example:
cp /mounted_dir/foo.jpg /tmp/foo.jpg
diff /mounted_dir/foo.jpg /tmp/foo.jpg
open /tmp/foo.jpg
open /mounted_dir/foo.jpg
Is there any other way than setting a preference for this (in the "System Preferences"> "Security and Privacy" section: set "Allow applications downloaded from" to "Anywhere")?
Ideally, I would like open -force or command line mode to tell the system that the file is not corrupted, or (in extreme cases) the command line to set System Preferences> Security and Privacy.
source
share