sccn / amica

Code for AMICA: Adaptive Mixture ICA with shared components
BSD 2-Clause "Simplified" License
24 stars 15 forks source link

Issue with folders containing special characters #8

Open arnodelorme opened 6 years ago

arnodelorme commented 6 years ago

I noticed that there is an issue of AMICA v1.5.1 on EEGLab 15 when the data.set is in a path containing round-bracket characters "(" or ")". The error message is /bin/bash: -c: line 0: syntax error near unexpected token `(' My fix right now is to move the data.set to another directory. Since Dropbox automatically creates folders with round-bracket characters to distinguish private and institution sync folders, I would like to know if there is a cure for this issue. Thank you.

co60ca commented 6 years ago

This is probably an issue with failing to quote the filename somewhere. https://github.com/japalmer29/amica/blob/206dfcc18b1b8fa74bf57292e6a5e9fa71fc409a/runamica15.m#L861 system([AMBIN ' ' outdir 'input.param']); to system([AMBIN ' "' outdir 'input.param"']);

I haven't used EEGLab or Matlab for a while so I can't test but this is probably the fix needed. Should also consider switching it to sprintf formatting to make it easier to read.

Also happens here: https://github.com/japalmer29/amica/blob/206dfcc18b1b8fa74bf57292e6a5e9fa71fc409a/runamica15.m#L764 Change to

system(['mkdir "' outdir '"']);