Actually, this is incorrect I think. If the default is not local, but the user specifies `file://` then this will use the next case and fail silently because of sync issues.

By the way the logic is a little obfuscated to me right now. Since we only match on 2 cases here, I think it's more straightforward to write it out with `if-else`.