Skip to content

Improper long path support for relative paths #10992

Closed
@lunter2

Description

@lunter2

Description

The following code:

<?php
 chdir('C:\\');print(getcwd()); // C:\ (ok)

 var_dump(mkdir('C:\\'.str_repeat('a',255))); // true (absolute path - directory name with 255 characters created)
 var_dump(mkdir(str_repeat('b',255))); // false (relative path - directory name with 255 characters NOT created - max 247 characters works)
?>

Resulted in this output:

C:\
bool(true)
bool(false)

But I expected this output instead:

C:\
bool(true)
bool(true)

PHP Version

PHP 8.2.4

Operating System

Windows 10 Pro 22H2 (10.0.19045.2788)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions