Skip to content

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

+1-1
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)