Opened 14 years ago
Closed 14 years ago
#15598 closed enhancement (worksforme)
Use DIRECTORY_SEPARATOR for file paths instead of '/'
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.1 |
Component: | General | Keywords: | needs-patch |
Focuses: | Cc: |
Description
Unix directory path separators ('/') are hardcoded in throughout theme.php and perhaps other files. As a result, when running wordpress off a Windows system and using alternative theme directories (via register_theme_directory()) a "theme broken" error is thrown because the code can't find files within the theme path.
If the same theme is moved into the normal themes directory, everything works fine. If the code is run on a unix system, everything also works fine.
Change History (5)
#2
@
14 years ago
- Component changed from Themes to General
- Keywords needs-patch added; DIRECTORY_SEPARATOR removed
- Milestone changed from Awaiting Review to Future Release
- Severity changed from major to normal
#5
@
14 years ago
- Milestone Future Release deleted
- Resolution set to worksforme
- Status changed from new to closed
Using DIRECTORY_SEPERATOR clutters the code to me IMO, Using / is so much simpler given it's supported on both Windows and Unix systems.
We use str_replace('\\', '/'..
quite often in functions such as register_activation_hook
If there is anywhere that does not work well with Windows filepaths, please file a bug report for the individual issue.
An alternative solution would be to make the register_theme_directory() and related functions check both / and \.