File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
tmc-langs-framework/src/main/java/fi/helsinki/cs/tmc/langs/utils Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,21 @@ private void addAllIfList(Object files) {
107
107
108
108
private void addIfString (Object value ) {
109
109
if (value instanceof String ) {
110
- Path path = Paths .get ((String ) value );
110
+ String [] pathParts = ((String ) value ).split ("/" );
111
+ Path path = constructPathfromArray (pathParts );
111
112
extraStudentFiles .add (path );
112
113
log .trace ("Added {} as extra student file" , path );
113
114
}
114
115
}
115
116
117
+ private Path constructPathfromArray (String [] parts ) {
118
+ Path path = Paths .get (parts [0 ]);
119
+ for (int i = 1 ; i < parts .length ; i ++) {
120
+ path = path .resolve (parts [i ]);
121
+ }
122
+ return path ;
123
+ }
124
+
116
125
private String initFileContents (File file ) {
117
126
try {
118
127
log .trace ("Reading config file" );
You can’t perform that action at this time.
0 commit comments