I don't think it matters, but ideally you'd set exportPath only if you were going to return true.  i.e. move this if block above the assignment.

Also, `path.substr(exportPaht.length(), 1) != "/"` is equivalent to `path[exportPath.length()] != '/'`