Skip to content

Commit 7f370f8

Browse files
committed
Drop dead Windows code
Maybe fix build?
1 parent 131f98a commit 7f370f8

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

ext/phar/phar.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,15 +2220,9 @@ zend_string* phar_split_fname_ex(const char *filename, size_t filename_len, zend
22202220
if (entry) {
22212221
if (ext_str[ext_len]) {
22222222
size_t computed_entry_len = filename_len - arch_len;
2223-
#ifdef PHP_WIN32
2224-
/* TODO: can we handle the unixify path in phar_fix_filepath() directly ? */
2225-
char *fixed_path_for_windows = estrndup(ext_str+ext_len, computed_entry_len);
2226-
phar_unixify_path_separators(fixed_path_for_windows, computed_entry_len);
2227-
*entry = phar_fix_filepath(fixed_path_for_windows, computed_entry_len, false);
2228-
efree(fixed_path_for_windows);
2229-
#else
2223+
/* We don't need to unixify the path on Windows,
2224+
* as ext_str is derived from filename that was already unixify */
22302225
*entry = phar_fix_filepath(ext_str+ext_len, computed_entry_len, false);
2231-
#endif
22322226
} else {
22332227
*entry = ZSTR_CHAR('/');
22342228
}

0 commit comments

Comments
 (0)