-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VSCode URI <-> OS file paths conversion hacks once and for all #2
Comments
@Jazzpirate Have you so far encountered an ultimately satisfying solution (e.g., for mmt-stex)? |
I assume that means the current solution does not work? As far as I can tell, it does (for mmt-stex)... |
Workarounds are spread all over the place in I built something: object Utils {
def vscodeURIToFile(uri: URI): File = {
if (uri.scheme.contains("file")) {
val filePath = (uri.path match {
case driveLetter :: xs if driveLetter.matches("[a-zA-Z](:|%3A)") =>
(driveLetter.charAt(0).toUpper + ":") :: xs
case x => x
}).mkString(java.io.File.separator)
File(filePath)
} else { // fallback
File(uri.toString)
}
}
} Any thoughts? |
I think this should go into the existent methods for converting URIs - they are already used all over the place and it's probably a good thing if the URI used to identify documents is a valid file URI (if it is one)...? |
The VSCode Extension is giving me error messages like this every time I save a file:
Is there a workaround to be able to use the extension in its current version? |
No description provided.
The text was updated successfully, but these errors were encountered: