Skip to content

Commit d49fe0f

Browse files
committed
Regression fix
1 parent abe9c4c commit d49fe0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/java/com/gentics/mesh/core/image/spi/AbstractImageManipulator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ protected Single<CacheFileInfo> getCacheFilePathOld(String sha512sum, ImageManip
121121

122122
String baseFolder = Paths.get(options.getImageCacheDirectory(), buffer.toString()).toString();
123123
String baseName = "image-" + parameters.getCacheKey();
124+
String retPath = Paths.get(baseFolder, baseName).toString();
124125

125126
return fs.rxExists(baseFolder).flatMap(exists -> {
126127
if (exists) {
127128
return fs.rxReadDir(baseFolder, baseName + "(\\..*)?").flatMap(foundFiles -> {
128129
int numFiles = foundFiles.size();
129130
if (numFiles == 0) {
130-
String retPath = Paths.get(baseFolder, baseName).toString();
131131
if (log.isDebugEnabled()) {
132132
log.debug("No cache file found for base path {" + retPath + "}");
133133
}
@@ -154,7 +154,7 @@ protected Single<CacheFileInfo> getCacheFilePathOld(String sha512sum, ImageManip
154154
return Single.just(new CacheFileInfo(foundFiles.get(0), true));
155155
});
156156
} else {
157-
return Single.just(new CacheFileInfo(baseName, false));
157+
return Single.just(new CacheFileInfo(maybeNewPath.orElse(retPath), false));
158158
}
159159
});
160160
}

0 commit comments

Comments
 (0)