]> granicus.if.org Git - php/commitdiff
- Fix bug in virtual dir under Windows when using absolute paths without
authorZeev Suraski <zeev@php.net>
Mon, 26 Jun 2000 16:24:28 +0000 (16:24 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 26 Jun 2000 16:24:28 +0000 (16:24 +0000)
- drive letter

main/php_virtual_cwd.c

index ea2f09fda5a4a30d95cf036684ae9e1703cd1bc6..2c378b760e82f3010c6b4993093647485b3ba510 100644 (file)
@@ -296,13 +296,13 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
                if (copy_amount) {
                        if (is_absolute) {
                                memcpy(state->cwd, path_copy, copy_amount);
+                               path_copy += copy_amount;
                        } else {
                                memcpy(state->cwd, old_state->cwd, copy_amount);
                        }
                }
                state->cwd[copy_amount] = '\0';
                state->cwd_length = copy_amount;
-               path_copy += copy_amount;
        }