Commit 5cbbb8b
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 4ecb946 commit 5cbbb8b
1 file changed
+22
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
381 | | - | |
382 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
383 | 388 | | |
384 | 389 | | |
385 | 390 | | |
| |||
618 | 623 | | |
619 | 624 | | |
620 | 625 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | 626 | | |
625 | 627 | | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | 628 | | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
646 | 637 | | |
647 | 638 | | |
| 639 | + | |
| 640 | + | |
648 | 641 | | |
649 | 642 | | |
650 | 643 | | |
651 | 644 | | |
652 | 645 | | |
653 | 646 | | |
654 | | - | |
| 647 | + | |
| 648 | + | |
655 | 649 | | |
| 650 | + | |
| 651 | + | |
656 | 652 | | |
657 | 653 | | |
658 | 654 | | |
| |||
0 commit comments