Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit bd883b8

Browse files
authored
Add terminating separator to avoid path escaping (#2288)
1 parent 773f942 commit bd883b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static String readFileToString(String filePath) throws IOException {
124124
}
125125

126126
private static String validateFileName(String fileName, File destinationFolder) throws IOException {
127-
String destinationFolderCanonicalPath = destinationFolder.getCanonicalPath();
127+
String destinationFolderCanonicalPath = destinationFolder.getCanonicalPath() + File.separator;
128128

129129
File file = new File(destinationFolderCanonicalPath, fileName);
130130
String canonicalPath = file.getCanonicalPath();

0 commit comments

Comments
 (0)