Bug #53811 [Opn->Wfx]: filesize disregards case sensitive file system
| From: | pajoye@php.net | Date: | Sat, 22 Jan 2011 12:16:28 +0000 |
| Subject: | Bug #53811 [Opn->Wfx]: filesize disregards case sensitive file system | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-158073@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53811&edit=1
ID: 53811
Updated by: pajoye@php.net
Reported by: jl_ewing at hotmail dot com
Summary: filesize disregards case sensitive file system
-Status: Open
+Status: Wont fix
Type: Bug
Package: Filesystem function related
Operating System: Windows XP
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
No, it should not. Case insensitive NTFS partition support is highly
experimental
and requires special cases and APIs calls. We aren't going to support
that any
time soon.
Previous Comments:
------------------------------------------------------------------------
[2011-01-22 06:19:02] jl_ewing at hotmail dot com
Description:
------------
Windows XP with NTFS and Case in-sensitivity is DISABLED (e.g. the file
system is case sensitive). PHP 5.3.5 is VC6 x86 Non Thread Safe ZIP
file extracted \PHP535 directory
HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\kernel\obcaseinsensitive 0
C:\opt\files>dir
Volume in drive C is Boot
Volume Serial Number is 84D1-331E
Directory of C:\opt\files
01/21/2011 11:03 PM <DIR> .
01/21/2011 11:03 PM <DIR> ..
01/21/2011 11:03 PM 3,400 testA.out
01/21/2011 11:03 PM 550 testa.out
2 File(s) 3,950 bytes
2 Dir(s) 65,225,863,168 bytes free
C:\PHP535>php -f test.php (see test script)
Array
(
[testA.out] => 550
[testa.out] => 550
)
The file that was created first seems to be the one that it uses. On
NTFS file systems that are case sensitive filesize should pick up the
appropriate file sizes
Test script:
---------------
$dir = '\\opt\\files';
$index = array();
$files = scandir($dir);
foreach ($files as $file) {
if (is_file($dir . '\\' . $file)) {
$sizeX = filesize($dir. "/$file");
$index[$file] = $sizeX;
unset ($file, $sizeX);
}
}
print_r($index);
Expected result:
----------------
Array
(
[testA.out] => 3400
[testa.out] => 550
)
Actual result:
--------------
Array
(
[testA.out] => 550
[testa.out] => 550
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53811&edit=1