When you have a music folder /music and a playlists folder /music/playlists , then reading a playlist with a song ../a.mp3 inside resolved to "/music/playlists/../a.mp3" , which broke the import operation. Using getCanonicalPath instead of getAbsolutePath fixes the issue, since the former resolves the URI to /music/a.mp3