File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/util Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,14 @@ public static boolean validate(String ctagsBinary) {
72
72
* @return true if at least one symbol was found, false otherwise
73
73
*/
74
74
private static boolean canProcessFiles (String basePath ) {
75
- Path inputPath = Path .of (basePath , "ctagsValidationTemporaryFile.c" );
75
+ Path inputPath ;
76
+ try {
77
+ inputPath = File .createTempFile ("ctagsValidation" , ".c" ,
78
+ new File (basePath )).toPath ();
79
+ } catch (IOException e ) {
80
+ LOGGER .log (Level .WARNING , "cannot create temporary file in ''{0}''" , basePath );
81
+ return false ;
82
+ }
76
83
final String resourceFileName = "sample.c" ;
77
84
ClassLoader classLoader = CtagsUtil .class .getClassLoader ();
78
85
try (InputStream inputStream = classLoader .getResourceAsStream (resourceFileName )) {
You can’t perform that action at this time.
0 commit comments