-
Notifications
You must be signed in to change notification settings - Fork 15
fix system cp flags problem on macs #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix system cp flags problem on macs #105
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #105 +/- ##
==========================================
+ Coverage 41.83% 43.78% +1.95%
==========================================
Files 56 56
Lines 1310 1311 +1
==========================================
+ Hits 548 574 +26
+ Misses 762 737 -25
Continue to review full report at Codecov.
|
|
in case we want to track any errors from so it will be try
status = system( ...
sprintf('cp -R -L %s %s', ...
fullfile(rawDir, subDir), ...
fullfile(derivativesDir, subDir)));
if status > 0
error('...')
end
catch
message = [ ...
'Copying data with system command failed: ' ...
'are you running Windows?\n', ...
'Will use matlab/octave copyfile command instead.\n', ...
'Could be an issue if your data set contains symbolic links' ...
'(e.g. if you use datalad or git-annex.'];
warning(message);
copyfile(fullfile(rawDir, subDir), ...
fullfile(derivativesDir, subDir));
end
|
Remi-Gau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
btw, let me know what you think about the 'error' thing, we can change it in the fly like try
status = system( ...
sprintf('cp -R -L %s %s', ...
fullfile(rawDir, subDir), ...
fullfile(derivativesDir, subDir)));
if status > 0
message = [ ...
'Copying data with system command failed: ' ...
'are you running Windows?\n', ...
'Will use matlab/octave copyfile command instead.\n', ...
'Could be an issue if your data set contains symbolic links' ...
'(e.g. if you use datalad or git-annex.'];
error(message)
end
catch
copyfile(fullfile(rawDir, subDir), ...
fullfile(derivativesDir, subDir));
end
|
|
yup looks good! |
I am tired. I thought we had added it: go ahead and add it. 🚀 |
…o marco_system-raw-copy-error
|
done |
to check if this works on linux
fix #90