File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 53
53
cfg = setFilenames(cfg );
54
54
55
55
talkToMe(cfg , sprintf(' \n Data will be saved in this directory:\n\t%s\n ' , ...
56
- fullfile(cfg .dir .outputSubject , cfg .fileName .modality )));
56
+ pathToPrint(fullfile(cfg .dir .outputSubject , ...
57
+ cfg .fileName .modality ))));
57
58
58
- talkToMe(cfg , sprintf(' \n Data will be saved in this file:\n\t%s\n ' , cfg .fileName .events ));
59
+ talkToMe(cfg , sprintf(' \n Data will be saved in this file:\n\t%s\n ' , ...
60
+ pathToPrint(cfg .fileName .events )));
59
61
60
62
if cfg .eyeTracker .do
61
63
62
64
talkToMe(cfg , sprintf(' \n Eyetracking data will be saved in this directory:\n\t%s\n ' , ...
63
- fullfile(cfg .dir .outputSubject , ' eyetracker' )));
65
+ pathToPrint(fullfile(cfg .dir .outputSubject , ...
66
+ ' eyetracker' ))));
64
67
65
68
talkToMe(cfg , sprintf(' \n Eyetracking data will be saved in this file:\n\t%s\n ' , ...
66
- cfg .fileName .eyetracker ));
69
+ pathToPrint( cfg .fileName .eyetracker ) ));
67
70
68
71
end
69
72
Original file line number Diff line number Diff line change
1
+ function pth = pathToPrint(pth )
2
+ %
3
+ % Replaces single '\' by '/' on Windows
4
+ % to prevent escaping warning when printing a path
5
+ %
6
+ % :param pth: If pth is a cellstr of paths, pathToPrint will work
7
+ % recursively on it.
8
+ % :type pth: char or cellstr
9
+ %
10
+ % (C) Copyright 2021 CPP_BIDS developers
11
+
12
+ if isunix()
13
+ return
14
+ end
15
+
16
+ if ischar(pth )
17
+ pth = strrep(pth , ' \' , ' /' );
18
+
19
+ elseif iscell(pth )
20
+ for i = 1 : numel(pth )
21
+ pth{i } = pathToPrint(pth{i });
22
+ end
23
+ end
24
+
25
+ end
You can’t perform that action at this time.
0 commit comments