Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
reprepro
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Bernhard Link
reprepro
Commits
b30f466c
Commit
b30f466c
authored
Dec 18, 2004
by
Bernhard Link
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forget files that cannot be deleted as they are not there
parent
9159307d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
main.c
main.c
+10
-5
No files found.
main.c
View file @
b30f466c
/* This file is part of "reprepro"
* Copyright (C) 2003 Bernhard R. Link
* Copyright (C) 2003
,2004
Bernhard R. Link
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
...
...
@@ -218,7 +218,7 @@ static retvalue deleteifunreferenced(void *data,const char *filekey,const char *
struct
fileref
*
dist
=
data
;
retvalue
r
;
char
*
filename
;
int
err
;
int
err
,
en
;
r
=
references_isused
(
dist
->
refs
,
filekey
);
if
(
r
==
RET_NOTHING
)
{
...
...
@@ -230,10 +230,15 @@ static retvalue deleteifunreferenced(void *data,const char *filekey,const char *
else
{
err
=
unlink
(
filename
);
if
(
err
!=
0
)
{
r
=
RET_ERRNO
(
errno
);
fprintf
(
stderr
,
"error while unlinking %s: %m
\n
"
,
filename
);
en
=
errno
;
r
=
RET_ERRNO
(
en
);
if
(
errno
==
ENOENT
)
{
fprintf
(
stderr
,
"%s not found, forgetting anyway
\n
"
,
filename
);
}
else
{
fprintf
(
stderr
,
"error while unlinking %s: %m(%d)
\n
"
,
filename
,
en
);
}
}
if
(
err
==
0
||
force
)
if
(
err
==
0
||
en
==
ENOENT
||
force
)
r
=
files_remove
(
dist
->
files
,
filekey
);
free
(
filename
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment