Skip to content

Commit f0276ad

Browse files
committed
fix path quoting
1 parent 3293cf1 commit f0276ad

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ void indexDown(File dir, String parent, IndexDownArgs args, Progress progress) t
17271727

17281728
File[] files = dir.listFiles();
17291729
if (files == null) {
1730-
LOGGER.log(Level.SEVERE, "Failed to get file listing for: ''{0}''", dir.getPath());
1730+
LOGGER.log(Level.SEVERE, "Failed to get file listing for ''{0}''", dir.getPath());
17311731
return;
17321732
}
17331733
Arrays.sort(files, FILENAME_COMPARATOR);

opengrok-indexer/src/main/java/org/opengrok/indexer/index/Indexer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,11 @@ public static void main(String[] argv) {
338338
stream().map(RepositoryInfo::getDirectoryNameRelative).collect(Collectors.toSet()));
339339
}
340340
} else {
341-
System.err.println("The path " + path
342-
+ " does not correspond to a project");
341+
System.err.println(String.format("The path '%s' does not correspond to a project", path));
342+
System.exit(1);
343343
}
344344
} else {
345+
// TODO: does this assume projects are enabled ?
345346
subFiles.add(path);
346347
}
347348
}
@@ -1257,7 +1258,7 @@ private static void addIndexDatabase(String path, Project project, List<IndexDat
12571258
}
12581259
}
12591260
} else {
1260-
LOGGER.log(Level.WARNING, "Directory does not exist \"{0}\"", path);
1261+
LOGGER.log(Level.WARNING, "Directory ''{0}'' does not exist", path);
12611262
}
12621263
}
12631264

0 commit comments

Comments
 (0)