File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed
tmc-langs-csharp/src/main/java/fi/helsinki/cs/tmc/langs/csharp Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -178,13 +178,9 @@ private String getBootstrapPath() {
178
178
return envVarPath ;
179
179
}
180
180
181
- try {
182
- Scanner in = new Scanner (new FileReader ("tmc-langs-csharp/bootstrapPath.txt" ));
183
- return in .nextLine ();
184
- } catch (Exception e ) {
185
- log .error (CANNOT_LOCATE_RUNNER_MESSAGE , e );
186
- return null ;
187
- }
181
+ log .error (CANNOT_LOCATE_RUNNER_MESSAGE );
182
+
183
+ return null ;
188
184
}
189
185
190
186
private boolean doesProjectContainCSharpFiles (Path path ) {
Original file line number Diff line number Diff line change @@ -13,7 +13,23 @@ public CSharpStudentFilePolicy(Path configFileParent) {
13
13
14
14
@ Override
15
15
public boolean isStudentSourceFile (Path path , Path projectRootPath ) {
16
+ if (this .isChildOfBinaryDir (path )) {
17
+ return false ;
18
+ }
19
+
16
20
return path .startsWith (Paths .get ("src" ));
17
21
}
18
-
22
+
23
+ private boolean isChildOfBinaryDir (Path path ) {
24
+ for (Path testPath : path ) {
25
+ Path fileName = testPath .getFileName ();
26
+
27
+ if (fileName .equals (Paths .get ("bin" ))
28
+ || fileName .equals (Paths .get ("obj" ))) {
29
+ return true ;
30
+ }
31
+ }
32
+
33
+ return false ;
34
+ }
19
35
}
You can’t perform that action at this time.
0 commit comments