truncating file:// protocol where applicable in metadata func

This commit is contained in:
Fil Maj 2012-02-16 17:21:03 -08:00 committed by Joe Bowser
parent b4d1ca6181
commit 79ba28d6c4

View File

@ -755,6 +755,9 @@ public class FileUtils extends Plugin {
* @throws JSONException
*/
private JSONObject getFileMetadata(String filePath) throws FileNotFoundException, JSONException {
if (filePath.startsWith("file://")) {
filePath = filePath.substring(7);
}
File file = new File(filePath);
if (!file.exists()) {