File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ func (fs *Filesystem) Delete(p string) error {
406406// it recursively deletes all non-denylisted files and subdirectories. Empty directories
407407// are removed automatically, but directories containing denylisted files are preserved.
408408func (fs * Filesystem ) SafeDeleteRecursively (p string ) error {
409- info , err := fs .Stat (p )
409+ info , err := fs .unixFS . Lstat (p )
410410 if err != nil {
411411 return err
412412 }
@@ -436,7 +436,7 @@ func (fs *Filesystem) SafeDeleteRecursively(p string) error {
436436 return err
437437 }
438438 // Check if the directory still exists after recursive deletion
439- if _ , statErr := fs .Stat (child ); statErr == nil {
439+ if _ , statErr := fs .unixFS . Lstat (child ); statErr == nil {
440440 hasRemainingFiles = true
441441 }
442442 continue
You can’t perform that action at this time.
0 commit comments