mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-05-18 13:49:15 -04:00
Merge pull request #1404 from joserebelo/import-trailing-slash
Fix parse of import URI with trailing slash
This commit is contained in:
@@ -46,8 +46,11 @@ public class ImportURIHelper {
|
||||
}
|
||||
|
||||
private boolean isImportUri(Uri uri) {
|
||||
// Remove trailing slash added by some browsers (if it exists)
|
||||
final String uriPath = uri.getPath().replaceAll("/$", "");
|
||||
|
||||
for (int i = 0; i < hosts.length; i++) {
|
||||
if (uri.getHost().equals(hosts[i]) && uri.getPath().equals(paths[i])) {
|
||||
if (uri.getHost().equals(hosts[i]) && uriPath.equals(paths[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user