File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## [ 5.14.4] ( https://github.com/appium/appium-ios-remotexpc/compare/v5.14.3...v5.14.4 ) (2026-08-12)
2+
3+ ### Bug Fixes
4+
5+ * ** afc:** make walk tolerant to untraversable directories ([ #292 ] ( https://github.com/appium/appium-ios-remotexpc/issues/292 ) ) ([ ac6959b] ( https://github.com/appium/appium-ios-remotexpc/commit/ac6959bd413ce4b7685895d3c024c0861be17b7f ) )
6+
17## [ 5.14.3] ( https://github.com/appium/appium-ios-remotexpc/compare/v5.14.2...v5.14.3 ) (2026-08-11)
28
39### Bug Fixes
Original file line number Diff line number Diff line change 11{
22 "name" : " appium-ios-remotexpc" ,
3- "version" : " 5.14.3 " ,
3+ "version" : " 5.14.4 " ,
44 "description" : " " ,
55 "keywords" : [],
66 "bugs" : {
Original file line number Diff line number Diff line change @@ -479,14 +479,33 @@ export class AfcService {
479479 log . debug ( `Successfully pushed file to '${ remoteDst } '` ) ;
480480 }
481481
482+ /**
483+ * Recursively list `root` and everything below it. Untraversable directories are skipped
484+ * rather than aborting the walk: the media sandbox exposes directories it refuses to read
485+ * (e.g. `/PhotoData/UBF` answers GET_FILE_INFO but fails READ_DIR with PERM_DENIED).
486+ */
482487 async walk ( root : string ) : Promise < Array < { dir : string ; dirs : string [ ] ; files : string [ ] } > > {
483488 const out : Array < { dir : string ; dirs : string [ ] ; files : string [ ] } > = [ ] ;
484- const entries = await this . listdir ( root ) ;
489+ let entries : string [ ] ;
490+ try {
491+ entries = await this . listdir ( root ) ;
492+ } catch ( error ) {
493+ log . debug ( `Skipping '${ root } ' during walk, cannot list it:` , error ) ;
494+ return out ;
495+ }
485496 const dirs : string [ ] = [ ] ;
486497 const files : string [ ] = [ ] ;
487498 for ( const e of entries ) {
488499 const p = path . posix . join ( root , e ) ;
489- if ( await this . isdir ( p ) ) {
500+ let isDir : boolean ;
501+ try {
502+ isDir = await this . isdir ( p ) ;
503+ } catch ( error ) {
504+ // Unstattable entry: report it, but do not try to descend into it.
505+ log . debug ( `Cannot stat '${ p } ' during walk, treating it as a file:` , error ) ;
506+ isDir = false ;
507+ }
508+ if ( isDir ) {
490509 dirs . push ( e ) ;
491510 } else {
492511 files . push ( e ) ;
You can’t perform that action at this time.
0 commit comments