Bug #76335 [Com]: "link(): Bad file descriptor" with non-ASCII path
| From: | gadelat at gmail dot com | Date: | Sat, 12 May 2018 16:13:53 +0000 |
| Subject: | Bug #76335 [Com]: "link(): Bad file descriptor" with non-ASCII path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215232@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76335&edit=1
ID: 76335
Comment by: gadelat at gmail dot com
Reported by: gadelat at gmail dot com
Summary: "link(): Bad file descriptor" with non-ASCII path
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: Windows 7
PHP Version: 7.2.5
Block user comment: N
Private report: N
New Comment:
On another machine, this time with Windows 10, there is different output, but it still doesn't
work:
C:\Users\Beáta\parallel-functions>php -r
"var_dump(file_exists(__DIR__.'/LICENSE'));link(__DIR__.'/LICENSE',
__DIR__.'/b');"
bool(true)
PHP Warning: link(): No such file or directory in Command line code on line 1
Previous Comments:
------------------------------------------------------------------------
[2018-05-12 14:49:08] gadelat at gmail dot com
Description:
------------
link() does not work if source/target path is non-ascii
Test script:
---------------
C:\
λ touch file
C:\
λ mkdir a && cd a
C:\a
λ php -r "link(__DIR__.'/../file', __DIR__.'/b');"
C:\a
λ cd ..
C:\
λ mv a á && cd á
C:\á
λ php -r "link(__DIR__.'/../file', __DIR__.'/b');"
PHP Warning: link(): Bad file descriptor in Command line code on line 1
PHP Stack trace:
PHP 1. {main}() Command line code:0
PHP 2. link() Command line code:1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76335&edit=1