Skip to content

Commit cf0c35f

Browse files
committed
use constant for the SCCS directory
1 parent d8cbc72 commit cf0c35f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/SCCSHistoryParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
*/
4444
final class SCCSHistoryParser {
4545

46+
static final String SCCS_DIR_NAME = "SCCS";
47+
4648
boolean pass;
4749
boolean passRecord;
4850
boolean active;
@@ -258,7 +260,7 @@ private static File getSCCSFile(File file) {
258260

259261
@Nullable
260262
static File getSCCSFile(String parent, String name) {
261-
File f = Paths.get(parent, "SCCS", "s." + name).toFile();
263+
File f = Paths.get(parent, SCCS_DIR_NAME, "s." + name).toFile();
262264
if (!f.exists()) {
263265
return null;
264266
}

opengrok-indexer/src/main/java/org/opengrok/indexer/history/SCCSRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ boolean isRepositoryFor(File file, CommandTimeoutType cmdType) {
166166
if (f.isDirectory()) {
167167
return true;
168168
}
169-
return new File(file, "SCCS").isDirectory();
169+
return new File(file, SCCSHistoryParser.SCCS_DIR_NAME).isDirectory();
170170
}
171171
return false;
172172
}

0 commit comments

Comments
 (0)