diff --git a/Source/DafnyCore/DafnyMain.cs b/Source/DafnyCore/DafnyMain.cs index 3a7313ed7cb..5d9510fb31e 100644 --- a/Source/DafnyCore/DafnyMain.cs +++ b/Source/DafnyCore/DafnyMain.cs @@ -76,7 +76,7 @@ public DafnyFile(string filePath, bool useStdin = false) { // supported in .Net APIs, because it is very difficult in general // So we will just use the absolute path, lowercased for all file systems. // cf. IncludeComparer.CompareTo - CanonicalPath = !useStdin ? Canonicalize(filePath).AbsolutePath : ""; + CanonicalPath = !useStdin ? Canonicalize(filePath).LocalPath : ""; filePath = CanonicalPath; if (extension == ".dfy" || extension == ".dfyi") { diff --git a/Test/name with space/run.dfy b/Test/name with space/run.dfy new file mode 100644 index 00000000000..afd921cd707 --- /dev/null +++ b/Test/name with space/run.dfy @@ -0,0 +1,6 @@ +// RUN: %exits-with 0 %dafny /compile:3 "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +method Main() { + print "hello"; +} \ No newline at end of file diff --git a/Test/name with space/run.dfy.expect b/Test/name with space/run.dfy.expect new file mode 100644 index 00000000000..760564c0b54 --- /dev/null +++ b/Test/name with space/run.dfy.expect @@ -0,0 +1,3 @@ + +Dafny program verifier finished with 0 verified, 0 errors +hello \ No newline at end of file diff --git a/docs/dev/news/3683.fix b/docs/dev/news/3683.fix new file mode 100644 index 00000000000..8299ab88aa3 --- /dev/null +++ b/docs/dev/news/3683.fix @@ -0,0 +1 @@ +Tested support for paths with spaces in them \ No newline at end of file