truncating file:// protocol where applicable in metadata func

This commit is contained in:
Fil Maj 2012-02-16 17:21:03 -08:00
parent 6c48c6a3a1
commit 0ba803ff46

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()) {