Skip to content

fix: count only the files the current import brought - #154

Merged
oleksandr-nc merged 3 commits into
mainfrom
fix/import-bookkeeping
Sep 25, 2026
Merged

oleksandr-nc merged 3 commits into
mainfrom
fix/import-bookkeeping

Conversation

@oleksandr-nc

@oleksandr-nc oleksandr-nc commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Three small fixes from re-reading #144 before it was merged.

Only the current import is counted

The finish path resets nb_imported_files, cancelling an import does not, and an import that starts adds to whatever is there. Cancelling in the "Data migration" settings section writes importing_onedrive, last_onedrive_import_timestamp and imported_size, so the counter of imported files survives, and the next import reads it as its baseline and reports the sum when it finishes. imported_size right next to it was already reset at the start; this counter was not. The same applies to a job that is killed.

A file that cannot be looked up says so in the log

A file the target folder refuses to answer for is counted as a file that could not be downloaded, and the notification reporting it says to check the server logs, where nothing was written about it.

The Graph stub answers a development server only

tests/integration/graph-stub.php is a php file inside the app directory, so a web server can be asked to run it. It serves nothing but a fake drive, and now only as the router of a php -S development server.

An import that was interrupted hard leaves nb_imported_files behind, and the
number of imported files reported when the next one finishes was added on top
of it. The size counter next to it was already reset at the start.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
A file the target folder refuses to answer for is counted as a file that could
not be downloaded, and the notification reporting it says to check the server
logs, where nothing was written about it.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
The stub sits in the app directory, so a web server could be asked to run it.

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
@oleksandr-nc
oleksandr-nc merged commit 5a69217 into main Sep 25, 2026
24 checks passed
@oleksandr-nc
oleksandr-nc deleted the fix/import-bookkeeping branch September 25, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant