Skip to content

Commit

Permalink
SetupPsychtoolbox(): Revert path quoting for the macOS xattr calls.
Browse files Browse the repository at this point in the history
The one thing I didn't test before release, because what could possibly go wrong? :/
xattr can't do glob handling on quoted path :(.
  • Loading branch information
kleinerm committed Jun 7, 2024
1 parent 2b1d314 commit 5c919e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Psychtoolbox/SetupPsychtoolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,21 @@ function SetupPsychtoolbox(tryNonInteractiveSetup)
if IsOctave
% Fix the Octave mex files:
if IsARM
[rc, msg] = system(['xattr -d com.apple.quarantine "' p filesep 'PsychBasic/Octave8OSXFilesARM64/*.mex" 2>&1']);
[rc, msg] = system(['xattr -d com.apple.quarantine ' p filesep 'PsychBasic/Octave8OSXFilesARM64/*.mex 2>&1']);
else
[rc, msg] = system(['xattr -d com.apple.quarantine "' p filesep 'PsychBasic/Octave8OSXFiles64/*.mex" 2>&1']);
[rc, msg] = system(['xattr -d com.apple.quarantine ' p filesep 'PsychBasic/Octave8OSXFiles64/*.mex 2>&1']);
end
else
% Fix the Matlab mex files:
[rc, msg] = system(['xattr -d com.apple.quarantine "' p filesep 'PsychBasic/*.' mexext '"']);
[rc, msg] = system(['xattr -d com.apple.quarantine ' p filesep 'PsychBasic/*.' mexext]);
end

% Fix the DrawText plugin and other plugins:
if rc == 0 || ~isempty(strfind(msg, 'xattr: com.apple.quarantine')) %#ok<STREMP>
if IsOctave
[rc, msg] = system(['xattr -d com.apple.quarantine "' p filesep 'PsychBasic/PsychPlugins/*.dylib" 2>&1']);
[rc, msg] = system(['xattr -d com.apple.quarantine ' p filesep 'PsychBasic/PsychPlugins/*.dylib 2>&1']);
else
[rc, msg] = system(['xattr -d com.apple.quarantine "' p filesep 'PsychBasic/PsychPlugins/*.dylib"']);
[rc, msg] = system(['xattr -d com.apple.quarantine ' p filesep 'PsychBasic/PsychPlugins/*.dylib']);
end
end

Expand Down

0 comments on commit 5c919e9

Please sign in to comment.