summaryrefslogtreecommitdiff
path: root/srclib/apr/file_io/unix/filepath.c
diff options
context:
space:
mode:
Diffstat (limited to 'srclib/apr/file_io/unix/filepath.c')
-rw-r--r--srclib/apr/file_io/unix/filepath.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/srclib/apr/file_io/unix/filepath.c b/srclib/apr/file_io/unix/filepath.c
index fd0b6a25..78797bd9 100644
--- a/srclib/apr/file_io/unix/filepath.c
+++ b/srclib/apr/file_io/unix/filepath.c
@@ -1,9 +1,9 @@
-/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -225,10 +225,11 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
return APR_EABOVEROOT;
}
- /* Otherwise append another backpath.
+ /* Otherwise append another backpath, including
+ * trailing slash if present.
*/
- memcpy(path + pathlen, "../", 3);
- pathlen += 3;
+ memcpy(path + pathlen, "../", *next ? 3 : 2);
+ pathlen += *next ? 3 : 2;
}
else {
/* otherwise crop the prior segment