mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
Fix issue with pulling 2 new identical binary files with known name
This commit is contained in:
+6
-4
@@ -38,11 +38,13 @@ public class ResourceFetcher {
|
||||
} else {
|
||||
Util.sout("Found (" + projectName + "): " + url);
|
||||
Util.sout("At (" + projectName + "): " + path);
|
||||
RawFile rawFile = new RepositoryObjectTreeWalker(repository).getDirectoryContents().getFileTable().get(path);
|
||||
if (rawFile != null) {
|
||||
contents = fetchedUrls.get(url);
|
||||
if (contents == null) {
|
||||
RawFile rawFile = new RepositoryObjectTreeWalker(repository).getDirectoryContents().getFileTable().get(path);
|
||||
if (rawFile == null) {
|
||||
throw new IllegalStateException("file was not in the current commit, or the git tree, yet path was not null");
|
||||
}
|
||||
contents = rawFile.getContents();
|
||||
} else {
|
||||
contents = fetchedUrls.get(url);
|
||||
}
|
||||
}
|
||||
return new RepositoryFile(newPath, contents);
|
||||
|
||||
Reference in New Issue
Block a user