From 9bc13e7305f8d442078d332618bc515c47c1044d Mon Sep 17 00:00:00 2001 From: trmullen Date: Fri, 31 Jan 2014 18:29:50 -0800 Subject: [PATCH] Update run_writedataset.m fixed bug in run_writedataset causing file to always be written to bcilab/userdata --- code/online_plugins/Generic/run_writedataset.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/online_plugins/Generic/run_writedataset.m b/code/online_plugins/Generic/run_writedataset.m index c3b4fca7..5bcf1dde 100644 --- a/code/online_plugins/Generic/run_writedataset.m +++ b/code/online_plugins/Generic/run_writedataset.m @@ -43,7 +43,7 @@ function run_writedataset(varargin) % remove superfluous fields eeg = rmfield(stream,{'buffer','smax','buffer_len','timestamps','timestamps_len','timestamps_ptr','streamid'}); stream.timestamp_at_beginning = toc(uint64(0)); -eeg = pop_saveset(eeg,'filename',[fn fe],'filepath',env_translatepath('bcilab:/userdata'),'savemode','twofiles'); +eeg = pop_saveset(eeg,'filename',[fn fe],'filepath',fastif(isempty(fp),env_translatepath('bcilab:/userdata'),fp),'savemode','twofiles'); % re-create the fdt file... delete(fullfile(eeg.filepath, eeg.datfile)); fid = fopen(fullfile(eeg.filepath, eeg.datfile),'wb','ieee-le');