Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.ionic.libs</groupId>
<artifactId>ionfiletransfer-android</artifactId>
<version>0.0.1-dev-1</version>
<version>0.0.1-dev-3</version>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import java.util.regex.Pattern
import java.io.File
import java.net.URI
import java.net.URISyntaxException
import java.net.URLEncoder

internal class IONFLTRInputsValidator {

Expand Down Expand Up @@ -36,7 +37,11 @@ internal class IONFLTRInputsValidator {
return try {
val resolvedPath: String
if (path.startsWith("file://")) {
val uri = URI(path)
val encodedPath = URLEncoder.encode(
path.replace("file://", ""),
Charsets.UTF_8.toString()
).replace("+", "%20")
val uri = URI(encodedPath)
if (uri.path == null) {
return false
}
Expand Down