Skip to content

Commit 450c62f

Browse files
iroquetaBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:fix/relative_blob_file' into beta
1 parent 06b03e0 commit 450c62f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

common/src/main/java/com/genexus/CommonUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,13 @@ public static String getRelativeURL(String path)
24182418

24192419
public static String getRelativeBlobFile(String path)
24202420
{
2421-
return path.replace(com.genexus.ApplicationContext.getInstance().getServletEngineDefaultPath() + File.separator, "").replace(File.separator, "/");
2421+
String servletEngineDefaultPath = com.genexus.ApplicationContext.getInstance().getServletEngineDefaultPath();
2422+
if (!servletEngineDefaultPath.isEmpty() && path.startsWith(servletEngineDefaultPath)) {
2423+
return path.replace(servletEngineDefaultPath + File.separator, "").replace(File.separator, "/");
2424+
}
2425+
else {
2426+
return path;
2427+
}
24222428
}
24232429

24242430
public static final String FORMDATA_REFERENCE = "gxformdataref:";

0 commit comments

Comments
 (0)