Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfd6dbc2

Browse files
committed
Fix join_path_components() to not add a leading slash when joining to an
initial null string.Per report from Robert Haas in testing psql \ir.
1 parentdea5f6c commitfd6dbc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/port/path.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ join_path_components(char *ret_path,
212212
}
213213
if (*tail)
214214
snprintf(ret_path+strlen(ret_path),MAXPGPATH-strlen(ret_path),
215-
"/%s",tail);
215+
/* only add slash if there is something already in head */
216+
"%s%s",head[0] ?"/" :"",tail);
216217
}
217218

218219

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp