src/Pure/General/url.scala
changeset 65188 50cfc6775361
parent 65069 1995b421d8ef
child 66234 836898197296
--- a/src/Pure/General/url.scala	Sat Mar 11 16:22:12 2017 +0100
+++ b/src/Pure/General/url.scala	Sat Mar 11 20:18:06 2017 +0100
@@ -8,7 +8,7 @@
 
 
 import java.io.{File => JFile}
-import java.nio.file.Paths
+import java.nio.file.{Paths, FileSystemNotFoundException}
 import java.net.{URI, URISyntaxException}
 import java.net.{URL, MalformedURLException}
 import java.util.zip.GZIPInputStream
@@ -56,7 +56,10 @@
 
   def is_wellformed_file(uri: String): Boolean =
     try { parse_file(uri); true }
-    catch { case _: URISyntaxException | _: IllegalArgumentException => false }
+    catch {
+      case _: URISyntaxException | _: IllegalArgumentException | _: FileSystemNotFoundException =>
+        false
+    }
 
   def canonical_file(uri: String): JFile = parse_file(uri).getCanonicalFile
   def canonical_file_name(uri: String): String = canonical_file(uri).getPath