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) {
7272 * @return true if at least one symbol was found, false otherwise
7373 */
7474 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+ }
7683 final String resourceFileName = "sample.c" ;
7784 ClassLoader classLoader = CtagsUtil .class .getClassLoader ();
7885 try (InputStream inputStream = classLoader .getResourceAsStream (resourceFileName )) {
You can’t perform that action at this time.
0 commit comments