summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2008-12-03 20:30:45 +0000
committerSVN Migration <svn@php.net>2008-12-03 20:30:45 +0000
commit2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch)
tree33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /TSRM
parent3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff)
downloadphp-git-php-5.3.0alpha2.tar.gz
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 1617ad68c1..bf3860547e 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -503,7 +503,6 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
}
/* }}} */
-#undef LINK_MAX
#define LINK_MAX 32
static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, int use_realpath, int is_dir, int *link_is_dir TSRMLS_DC) /* {{{ */
@@ -819,6 +818,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
#endif
+
add_slash = (use_realpath != CWD_REALPATH) && path_length > 0 && IS_SLASH(resolved_path[path_length-1]);
t = CWDG(realpath_cache_ttl) ? 0 : -1;
path_length = tsrm_realpath_r(resolved_path, start, path_length, &ll, &t, use_realpath, 0, NULL TSRMLS_CC);
@@ -1033,14 +1033,8 @@ static int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
BOOL f;
HANDLE hFile;
- hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL,
- OPEN_ALWAYS, FILE_FLAG_BACKUP_SEMANTICS, NULL);
-
- /* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
- the CreateFile operation succeeds */
- if (GetLastError() == ERROR_ALREADY_EXISTS) {
- SetLastError(0);
- }
+ hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE, NULL,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
if ( hFile == INVALID_HANDLE_VALUE ) {
return -1;