Skip to content

Commit 1bd8802

Browse files
committed
checking file exists
1 parent c1c360b commit 1bd8802

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/factsmission/psps/JGitRepository.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ public String getCommitURL() throws IOException {
113113
@Override
114114
public byte[] getContent(String repoPath) throws IOException {
115115
Path path = workingDir.resolve(repoPath);
116+
if (!Files.exists(path)) {
117+
return null;
118+
}
116119
if (Files.isDirectory(path)) {
117120
return null;
118121
}

0 commit comments

Comments
 (0)