diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/deliverable.c | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/src/deliverable.c b/src/deliverable.c index 4e20943..1da66b0 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -1139,7 +1139,12 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx) {          char path_src[PATH_MAX];          sprintf(path_src, "%s/%s", ctx->storage.wheel_artifact_dir, rec->d_name); -        rename(path_src, path_dest); +        if (access(path_dest, F_OK)) { +            rename(path_src, path_dest); +        } else { +            copy2(path_src, path_dest, CT_PERM); +            remove(path_src); +        }      }      closedir(dp);      return 0; | 
