Skip to content

Commit 9bc13e7

Browse files
committed
Update run_writedataset.m
fixed bug in run_writedataset causing file to always be written to bcilab/userdata
1 parent 60eaaed commit 9bc13e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/online_plugins/Generic/run_writedataset.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function run_writedataset(varargin)
4343
% remove superfluous fields
4444
eeg = rmfield(stream,{'buffer','smax','buffer_len','timestamps','timestamps_len','timestamps_ptr','streamid'});
4545
stream.timestamp_at_beginning = toc(uint64(0));
46-
eeg = pop_saveset(eeg,'filename',[fn fe],'filepath',env_translatepath('bcilab:/userdata'),'savemode','twofiles');
46+
eeg = pop_saveset(eeg,'filename',[fn fe],'filepath',fastif(isempty(fp),env_translatepath('bcilab:/userdata'),fp),'savemode','twofiles');
4747
% re-create the fdt file...
4848
delete(fullfile(eeg.filepath, eeg.datfile));
4949
fid = fopen(fullfile(eeg.filepath, eeg.datfile),'wb','ieee-le');

0 commit comments

Comments
 (0)