Bug #76335 [Opn->Csd]: "link(): Bad file descriptor" with non-ASCII path
| From: | ab@php.net | Date: | Mon, 14 May 2018 08:45:52 +0000 |
| Subject: | Bug #76335 [Opn->Csd]: "link(): Bad file descriptor" with non-ASCII path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215247@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
Updated by: ab@php.net
Reported by: gadelat at gmail dot com
Summary: "link(): Bad file descriptor" with non-ASCII path
-Status: Open
+Status: Closed
Type: Bug
Package: Filesystem function related
Operating System: Windows 7
PHP Version: 7.2.5
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=9b8d8cac04dc663770d3d75a5c7660bfd7eacbef
Log: Fixed bug #76335 "link(): Bad file descriptor" with non-ASCII path
Previous Comments:
------------------------------------------------------------------------
[2018-05-12 16:13:51] gadelat at gmail dot com
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
------------------------------------------------------------------------
[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