We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac1e9a7 commit 7a46423Copy full SHA for 7a46423
src/dir.c
@@ -1150,12 +1150,22 @@ read_tablespace_map(parray *links, const char *backup_dir)
1150
while (fgets(buf, lengthof(buf), fp))
1151
{
1152
char link_name[MAXPGPATH];
1153
- char path[MAXPGPATH];
+ char *path;
1154
+ int n = 0;
1155
pgFile *file;
1156
+ int i = 0;
1157
- if (sscanf(buf, "%s %s", link_name, path) != 2)
1158
+ if (sscanf(buf, "%s %n", link_name, &n) != 1)
1159
elog(ERROR, "invalid format found in \"%s\"", map_path);
1160
1161
+ path = buf + n;
1162
+
1163
+ /* remove '\n' */
1164
+ i = strlen(path) - 1;
1165
+ path[i] = '\0';
1166
1167
+ elog(INFO, "STR: '%s'", path);
1168
1169
file = pgut_new(pgFile);
1170
memset(file, 0, sizeof(pgFile));
1171
0 commit comments