cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From FuzzyTree <>
Subject [GitHub] cordova-plugin-camera pull request: Try to use realpath filename i...
Date Thu, 28 Jan 2016 08:07:26 GMT
Github user FuzzyTree commented on the pull request:
    Debugging shows that `FileHelper.getRealPath` returns an empty (non-null) string, which
causes the function to return a directory name instead of a file name.
    `/storage/emulated/0/Android/data/com.ionicframework.ws938141/cache: open failed: EISDIR
(Is a directory)`
            // Some content: URIs do not map to file paths (e.g. picasa).
            String realPath = FileHelper.getRealPath(uri, this.cordova);
            // Get filename from uri
            String fileName = realPath != null ?
                realPath.substring(realPath.lastIndexOf('/') + 1) :
                "modified." + (this.encodingType == JPEG ? "jpg" : "png");
    Adding a check for empty string fixed the issue for me
        String fileName = (realPath != null && !realPath.isEmpty()) ?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message