mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-19 09:41:07 +02:00
improved result code check to work on windows
This commit is contained in:
parent
a1b1c205f1
commit
ec5687f459
|
@ -1294,9 +1294,10 @@ ngx_rtmp_dash_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
|
|||
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0,
|
||||
"dash: cleanup dir '%V'", &name);
|
||||
|
||||
if (ngx_delete_dir(spath.data) != NGX_OK) {
|
||||
if (ngx_delete_dir(spath.data) == NGX_FILE_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ERR, ngx_cycle->log, ngx_errno,
|
||||
"dash: cleanup dir error '%V'", &spath);
|
||||
"dash: cleanup " ngx_delete_dir_n
|
||||
"failed on '%V'", &spath);
|
||||
} else {
|
||||
nerased++;
|
||||
}
|
||||
|
@ -1384,7 +1385,7 @@ ngx_rtmp_dash_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
|
|||
"dash: cleanup '%V' mtime=%T age=%T",
|
||||
&name, mtime, ngx_cached_time->sec - mtime);
|
||||
|
||||
if (ngx_delete_file(spath.data) != NGX_OK) {
|
||||
if (ngx_delete_file(spath.data) == NGX_FILE_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ERR, ngx_cycle->log, ngx_errno,
|
||||
"dash: cleanup " ngx_delete_file_n " failed on '%V'",
|
||||
&spath);
|
||||
|
|
|
@ -1957,7 +1957,8 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
|
|||
|
||||
if (ngx_delete_dir(spath.data) != NGX_OK) {
|
||||
ngx_log_error(NGX_LOG_ERR, ngx_cycle->log, ngx_errno,
|
||||
"hls: cleanup dir error '%V'", &spath);
|
||||
"hls: cleanup " ngx_delete_dir_n
|
||||
"failed on '%V'", &spath);
|
||||
} else {
|
||||
nerased++;
|
||||
}
|
||||
|
@ -1999,9 +2000,10 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
|
|||
"hls: cleanup '%V' mtime=%T age=%T",
|
||||
&name, mtime, ngx_cached_time->sec - mtime);
|
||||
|
||||
if (ngx_delete_file(spath.data) != NGX_OK) {
|
||||
if (ngx_delete_file(spath.data) == NGX_FILE_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ERR, ngx_cycle->log, ngx_errno,
|
||||
"hls: cleanup error '%V'", &spath);
|
||||
"hls: cleanup " ngx_delete_file_n " failed on '%V'",
|
||||
&spath);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue