Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
fa6b8f8c
Commit
fa6b8f8c
authored
11 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
gh-185: add slash separator for pathes that are relative from work_dir.
closes #185.
parent
1dc8a656
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/tarantar/main.c
+21
-15
21 additions, 15 deletions
client/tarantar/main.c
client/tarantar/space.c
+2
-0
2 additions, 0 deletions
client/tarantar/space.c
with
23 additions
and
15 deletions
client/tarantar/main.c
+
21
−
15
View file @
fa6b8f8c
...
...
@@ -139,31 +139,37 @@ int main(int argc, char *argv[])
return
1
;
}
char
cur_dir_snap
[
PATH_MAX
],
cur_dir_wal
[
PATH_MAX
];
tss
.
snap_dir
=
cur_dir_snap
;
tss
.
wal_dir
=
cur_dir_wal
;
char
workdir
[
PATH_MAX
];
char
snapdir
[
PATH_MAX
],
waldir
[
PATH_MAX
];
tss
.
snap_dir
=
snapdir
;
tss
.
wal_dir
=
waldir
;
if
(
tss
.
opts
.
cfg
.
work_dir
!=
NULL
)
snprintf
(
workdir
,
sizeof
(
workdir
),
"%s"
,
tss
.
opts
.
cfg
.
work_dir
);
else
getcwd
(
workdir
,
PATH_MAX
);
if
(
tss
.
opts
.
cfg
.
work_dir
!=
NULL
)
{
strncpy
((
char
*
)
tss
.
snap_dir
,
tss
.
opts
.
cfg
.
work_dir
,
PATH_MAX
);
strncpy
((
char
*
)
tss
.
wal_dir
,
tss
.
opts
.
cfg
.
work_dir
,
PATH_MAX
);
}
else
{
getcwd
((
char
*
)
tss
.
snap_dir
,
PATH_MAX
);
getcwd
((
char
*
)
tss
.
wal_dir
,
PATH_MAX
);
}
if
(
tss
.
opts
.
cfg
.
snap_dir
!=
NULL
)
{
if
(
tss
.
opts
.
cfg
.
snap_dir
[
0
]
==
'/'
)
tss
.
snap_dir
=
tss
.
opts
.
cfg
.
snap_dir
;
else
strncat
((
char
*
)
tss
.
snap_dir
,
tss
.
opts
.
cfg
.
snap_dir
,
PATH_MAX
);
else
{
snprintf
(
snapdir
,
sizeof
(
snapdir
),
"%s/%s"
,
workdir
,
tss
.
opts
.
cfg
.
snap_dir
);
}
}
else
{
snprintf
(
snapdir
,
sizeof
(
snapdir
),
"%s"
,
workdir
);
}
if
(
tss
.
opts
.
cfg
.
wal_dir
!=
NULL
)
{
if
(
tss
.
opts
.
cfg
.
wal_dir
[
0
]
==
'/'
)
tss
.
wal_dir
=
tss
.
opts
.
cfg
.
wal_dir
;
else
strncat
((
char
*
)
tss
.
wal_dir
,
tss
.
opts
.
cfg
.
wal_dir
,
PATH_MAX
);
snprintf
(
waldir
,
sizeof
(
waldir
),
"%s/%s"
,
workdir
,
tss
.
opts
.
cfg
.
wal_dir
);
}
else
{
snprintf
(
waldir
,
sizeof
(
waldir
),
"%s"
,
workdir
);
}
/* create spaces */
rc
=
ts_space_init
(
&
tss
.
s
);
if
(
rc
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
client/tarantar/space.c
+
2
−
0
View file @
fa6b8f8c
...
...
@@ -238,6 +238,8 @@ int ts_space_fillof(struct ts_spaces *s, int n, tarantool_cfg_space *cs)
int
ts_space_fill
(
struct
ts_spaces
*
s
,
struct
ts_options
*
opts
)
{
if
(
opts
->
cfg
.
space
==
NULL
)
return
0
;
int
i
=
0
;
for
(;
opts
->
cfg
.
space
[
i
];
i
++
)
{
tarantool_cfg_space
*
cs
=
opts
->
cfg
.
space
[
i
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment