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

Commit3e49dd1

Browse files
committed
Fix make mkdir.sh if tablespace path have root path.
1 parentc2b2acc commit3e49dd1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎dir.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,13 @@ dir_print_mkdirs_sh(FILE *out, const parray *files, const char *root)
440440
pgFile*file= (pgFile*)parray_get(files,i);
441441
if (S_ISDIR(file->mode))
442442
{
443-
if (strstr(file->path,root)==file->path) {
444-
fprintf(out,"mkdir -m 700 -p %s\n",file->path+strlen(root)
445-
+1);
443+
if (strstr(file->path,root)==file->path&&
444+
*(file->path+strlen(root))=='/')
445+
{
446+
fprintf(out,"mkdir -m 700 -p %s\n",file->path+strlen(root)+1);
446447
}
447-
else {
448+
else
449+
{
448450
fprintf(out,"mkdir -m 700 -p %s\n",file->path);
449451
}
450452
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp