Inconsistency in @version's use of quotes

Apr 18, 2014
249
8
TCC 26.02.41 x64 Windows 10 [Version 10.0.19041.388]
TCC Build 41 Windows 10 Build 19041

If I use @version with filenames that have spaces in them the quoting of the returned names is inconsistent. For example, if the file "foo bar.txt" does not exist then @version returns a quoted filename:

Code:
d:\>dir /b "foo bar.txt"
TCC: (Sys) The system cannot find the file specified.
 "D:\foo bar.txt"

d:\>echo %@version["foo bar.txt"]
"D:\foo bar.txt"
But if the file already exists then @version returns the versioned filename without quotes:

Code:
d:\>dir /b "foo bar.txt"
foo bar.txt

d:\>echo %@version["foo bar.txt"]
D:\foo bar.txt;1
I was expecting @version to return quoted filenames in both cases, at the very least I think it should be consistent whether the file exists or not.