Commit def2b7c
committed
Fix: [file-enumerator] use g_file_enumerator_next_file()
--Replace use of g_file_enumerator_iterate() with g_file_enumerator_next_file()
in DEnumerator::hasNext() so the enumerator's internal cursor is advanced by
GIO and error/end conditions are handled unambiguously.
--Using g_file_enumerator_next_file() yields clearer semantics: non-NULL -> next entry,
NULL + NULL error -> end, NULL + non-NULL error -> error. This avoids premature termination
caused by backend-specific iterate() quirks.
--Construct next entry URL via the existing buildUrl(...) helper and preserve
existing logic that creates the DFileInfo from the returned GFileInfo. Preserve
existing error handling and d->checkFilter() behavior and recursive skipping of filtered entries.
--Fix URL construction so joining directory path and filename does not introduce
an extra '/' (previously produced e.g. .../vault_unlocked//file). The logic now
concatenates carefully (handles root path and trailing slashes) to avoid duplicate separators.
Log: fix issue
Bug: https://pms.uniontech.com//bug-view-351177.html1 parent 2769445 commit def2b7c
1 file changed
Lines changed: 19 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | | - | |
451 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
| |||
674 | 678 | | |
675 | 679 | | |
676 | 680 | | |
677 | | - | |
678 | | - | |
679 | 681 | | |
680 | 682 | | |
681 | 683 | | |
682 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
683 | 691 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | 692 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 693 | + | |
705 | 694 | | |
706 | 695 | | |
707 | 696 | | |
| |||
720 | 709 | | |
721 | 710 | | |
722 | 711 | | |
| 712 | + | |
723 | 713 | | |
724 | 714 | | |
725 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
726 | 718 | | |
727 | 719 | | |
728 | 720 | | |
| |||
0 commit comments