Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
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
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
Eric Vidal
66
Commits
6bb04ff1
Commit
6bb04ff1
authored
5 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
avoid to read old resolve directory
parent
1a39e5f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/66/66-update.c
+13
-3
13 additions, 3 deletions
src/66/66-update.c
with
13 additions
and
3 deletions
src/66/66-update.c
+
13
−
3
View file @
6bb04ff1
...
...
@@ -68,7 +68,7 @@ static void cleanup(void)
if
(
WORKDIR
.
len
)
{
log_trace
(
DRYRUN
?
drun
:
""
,
"delete temporary directory: "
,
WORKDIR
.
s
)
;
rm_rf
(
WORKDIR
.
s
)
;
//
rm_rf(WORKDIR.s) ;
}
errno
=
e
;
}
...
...
@@ -361,10 +361,20 @@ int main(int argc, char const *const *argv,char const *const *envp)
else
{
WORKDIR
.
len
=
0
;
log_trace
(
drun
,
"copy: "
,
info
.
tree
.
s
,
SS_SVDIRS
,
" to a temporary directory"
)
;
if
(
!
tree_copy
(
&
WORKDIR
,
info
.
tree
.
s
,
info
.
treename
.
s
))
log_dieusys_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"create tmp working directory"
)
;
auto_strings
(
tmp
,
WORKDIR
.
s
)
;
/* we need to remove the contain of .resolve directory
* The write process will try to read it and obviously it
* get a wrong information*/
auto_strings
(
tmp
,
WORKDIR
.
s
,
SS_RESOLVE
)
;
log_trace
(
drun
,
"remove directory: "
,
tmp
)
;
if
(
rm_rf
(
tmp
)
<
0
)
log_dieusys_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"remove: "
,
tmp
)
;
log_trace
(
drun
,
"create directory: "
,
tmp
)
;
if
(
!
dir_create_parent
(
tmp
,
0755
))
log_dieusys_nclean
(
LOG_EXIT_SYS
,
&
cleanup
,
"create directory: "
,
tmp
)
;
auto_string_from
(
tmp
,
0
,
WORKDIR
.
s
)
;
}
start_parser
(
&
contents
,
&
info
,
&
nbsv
,
DRYRUN
?
1
:
0
)
;
start_write
(
&
tostart
,
&
nclassic
,
&
nlongrun
,
tmp
,
&
gasv
,
&
info
,
DRYRUN
?
1
:
0
,
0
)
;
...
...
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