Skip to content

integration-cli: TestCopyFromContainerPathIsNotDir: adjust for win 2025#50189

Merged
robmry merged 1 commit intomoby:masterfrom
thaJeztah:fix_TestCopyFromContainerPathIsNotDir
Jun 12, 2025
Merged

integration-cli: TestCopyFromContainerPathIsNotDir: adjust for win 2025#50189
robmry merged 1 commit intomoby:masterfrom
thaJeztah:fix_TestCopyFromContainerPathIsNotDir

Conversation

@thaJeztah
Copy link
Member

It looks like the error returned by Windows changed in Windows 2025; before Windows 2025, this produced a ERROR_INVALID_NAME;

The filename, directory name, or volume label syntax is incorrect.

But Windows 2025 produces a ERROR_DIRECTORY ("The directory name is invalid."):

CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid.

Docs; https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

- A picture of a cute animal (not mandatory but encouraged)

It looks like the error returned by Windows changed in Windows 2025; before
Windows 2025, this produced a `ERROR_INVALID_NAME`;

    The filename, directory name, or volume label syntax is incorrect.

But Windows 2025 produces a `ERROR_DIRECTORY` ("The directory name is invalid."):

    CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid.

Docs; https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the fix_TestCopyFromContainerPathIsNotDir branch from 99bf8eb to d3d20b9 Compare June 12, 2025 13:18
@thaJeztah
Copy link
Member Author

Wondering if someone has Windows 2025 (or equivalent) to check if this is indeed Windows changing the error returned, or if (e.g.) \windows\system32\drivers\etc\hosts or any of its parent paths no longer exists (and that the change in error is because of that).

The intent of this test is to check for an error when trying to create a directory with a path-name that is a file.

@robmry
Copy link
Contributor

robmry commented Jun 12, 2025

or if (e.g.) \windows\system32\drivers\etc\hosts or any of its parent paths no longer exists (and that the change in error is because of that).

It's still there in mcr.microsoft.com/windows/nanoserver:ltsc2025 ...

C:\Windows\System32\drivers\etc>dir
 Volume in drive C has no label.
 Volume Serial Number is 6E70-71E2

 Directory of C:\Windows\System32\drivers\etc

04/01/2024  06:43 AM    <DIR>          .
06/07/2025  04:18 PM    <DIR>          ..
06/12/2025  07:33 PM               912 hosts
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants