Closed (fixed)
Project:
Drupal core
Component:
file system
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
19 Apr 2004 at 11:32 UTC
Updated:
23 Mar 2005 at 17:15 UTC
Jump to comment: Most recent file
some points i think should be improved in file.inc:
PHP_OS == 'WINNT'substr(PHP_OS, 0, 3) == 'WIN'. it might be useful to add a define('OS_WINDOWS', substr(PHP_OS, 0, 3) == 'WIN' ? TRUE : FALSE); (from pear/PEAR.php) for further tests, if needed.define('FILE_SEPARATOR', PHP_OS == 'WINNT' ? '\\' : '/');$dest = variable_get('file_directory_temp', (PHP_OS == 'WINNT' ? 'c:\\windows\\temp' : '/tmp'));get_cfg_var('upload_tmp_dir') and/or the system default tmp-dir. see this code snippet from the PHP Manual.| Comment | File | Size | Author |
|---|---|---|---|
| #5 | file-inc-windows-95-98-issue_0.patch | 1.11 KB | Stefan Nagtegaal |
| #3 | file-inc-windows-95-98-issue.patch | 1.56 KB | claybutterfly |
Comments
Comment #1
ax commentedand a related issue i forgot in my first post: the default "File System Path" ({drupal-dir}/files) should be created and included in drupal-4.4.0.tar.gz. see also Unnecessary step of creating folders for filestore (and maybe also Add directory-properties into README for proper filesystem usage).
Comment #2
ax commentedthe points from my original post still haven't been implemented and would still make much sense.
Comment #3
claybutterfly commentedThis solves the file issues on windows 95/98..
Tested this and works fine, also not noticed any problems on Windows XP.
Comment #4
chx commentedStefan, I can not make a patch from here, but
these lines are not needed, that's sure.
Comment #5
Stefan Nagtegaal commentedUpdated patch without the typo...
Comment #6
Steven commentedI think this can be done cleaner with a IS_WINDOWS constant defined once.
Comment #7
dries commentedI had a look at it, integrated Steven's suggestions, and committed it to HEAD.
Should this be backported to DRUPAL-4-5? That is, does it fix a bug? According to Stefan's comment (comment #3) it does, however, no bug reports are referenced.
Comment #8
Steven commentedI'm not exactly sure what the $regex is supposed to do... it would seem to check for a valid windows drive ('?:\\') but it allows any character for the first character. Also remember that windows PHP allows you to use forward slashes just fine, and that you can go to the root using / as well.
Comment #9
dries commentedComment #10
moshe weitzman commentedComment #11
(not verified) commented