@@ -148,7 +148,7 @@ export class WebDAVClient {
148148 } ) ;
149149
150150 // 添加调试信息
151- if ( process . env . NODE_ENV === 'development' || process . env . WEBDAV_DEBUG ) {
151+ if ( Number ( process . env . WEBDAV_DEBUG ) ) {
152152 console . log ( 'WebDAV PROPFIND response for' , remotePath , ':' , response . data ) ;
153153 }
154154
@@ -429,7 +429,7 @@ export class WebDAVClient {
429429 }
430430
431431 // 添加调试信息
432- if ( process . env . NODE_ENV === 'development' || process . env . WEBDAV_DEBUG ) {
432+ if ( Number ( process . env . WEBDAV_DEBUG ) ) {
433433 console . log ( 'WebDAV COPY operation:' ) ;
434434 console . log ( ' Source:' , normalizedSource ) ;
435435 console . log ( ' Destination URL:' , destinationUrl ) ;
@@ -517,7 +517,7 @@ export class WebDAVClient {
517517 const basePath = baseUrl . pathname ;
518518
519519 // 添加调试信息
520- if ( process . env . NODE_ENV === 'development' || process . env . WEBDAV_DEBUG ) {
520+ if ( Number ( process . env . WEBDAV_DEBUG ) ) {
521521 console . log ( '_normalizeResponsePath debug:' ) ;
522522 console . log ( ' Response path:' , responsePath ) ;
523523 console . log ( ' Base path:' , basePath ) ;
@@ -537,15 +537,15 @@ export class WebDAVClient {
537537 normalizedPath = '' ;
538538 }
539539
540- if ( process . env . NODE_ENV === 'development' || process . env . WEBDAV_DEBUG ) {
540+ if ( Number ( process . env . WEBDAV_DEBUG ) ) {
541541 console . log ( ' Normalized path:' , normalizedPath ) ;
542542 }
543543
544544 return normalizedPath ;
545545 }
546546
547547 // 如果不以基础路径开头,直接返回原路径
548- if ( process . env . NODE_ENV === 'development' || process . env . WEBDAV_DEBUG ) {
548+ if ( Number ( process . env . WEBDAV_DEBUG ) ) {
549549 console . log ( ' No normalization needed, returning:' , responsePath ) ;
550550 }
551551
@@ -571,7 +571,7 @@ export class WebDAVClient {
571571 const absoluteUrl = new URL ( cleanPath , baseURL ) . href ;
572572
573573 // 添加调试信息
574- if ( process . env . NODE_ENV === 'development' || process . env . WEBDAV_DEBUG ) {
574+ if ( Number ( process . env . WEBDAV_DEBUG ) ) {
575575 console . log ( '_getAbsoluteUrl debug:' ) ;
576576 console . log ( ' Input remotePath:' , remotePath ) ;
577577 console . log ( ' Normalized path:' , normalizedPath ) ;
0 commit comments