|
|
|
@@ -667,16 +667,10 @@ int ff_check_interrupt(AVIOInterruptCB *cb) |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
int ff_rename(const char *oldpath, const char *newpath, void *logctx) |
|
|
|
int ff_rename(const char *url_src, const char *url_dst, void *logctx) |
|
|
|
{ |
|
|
|
int ret = 0; |
|
|
|
if (rename(oldpath, newpath) == -1) { |
|
|
|
ret = AVERROR(errno); |
|
|
|
if (logctx) { |
|
|
|
char err[AV_ERROR_MAX_STRING_SIZE] = {0}; |
|
|
|
av_make_error_string(err, AV_ERROR_MAX_STRING_SIZE, ret); |
|
|
|
av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", oldpath, newpath, err); |
|
|
|
} |
|
|
|
} |
|
|
|
int ret = avpriv_io_move(url_src, url_dst); |
|
|
|
if (ret < 0) |
|
|
|
av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", url_src, url_dst, av_err2str(ret)); |
|
|
|
return ret; |
|
|
|
} |