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) {
107107
108108 private void addIfString (Object value ) {
109109 if (value instanceof String ) {
110- Path path = Paths .get ((String ) value );
110+ String [] pathParts = ((String ) value ).split ("/" );
111+ Path path = constructPathfromArray (pathParts );
111112 extraStudentFiles .add (path );
112113 log .trace ("Added {} as extra student file" , path );
113114 }
114115 }
115116
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+
116125 private String initFileContents (File file ) {
117126 try {
118127 log .trace ("Reading config file" );
You can’t perform that action at this time.
0 commit comments