[squeak-dev] Review Request: normalize-paths.2.cs

Tobias Pape Das.Linux at gmx.de
Mon Jul 11 12:10:53 UTC 2022


Hi

> On 9. Jul 2022, at 19:56, <christoph.thiede at student.hpi.uni-potsdam.de> <christoph.thiede at student.hpi.uni-potsdam.de> wrote:
> 
> DosFileDirectory class>>isUNCRoot: {platform specific} ยท ct 7/9/2022 17:17
> + isUNCRoot: fullName
> +     "e.g., '\\server' or '\\localhost\c$\Users'"
> + 
> +     ^ (fullName beginsWith: '\\') and: [(fullName occurrencesOf: $\) = 2]

Note that this one is tricky, you also have to care for \\?\, for example, this is valid: 

  \\?\C:\My Document\Bla\stuff.txt


See https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd 
And also https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/win32/plugins/FilePlugin/sqWin32File.h

Best regards
	-Tobias


More information about the Squeak-dev mailing list