Closed davehope closed 2 years ago
Thanks for the bug report and for the feedback!
I can't reproduce the bug. File sizes (and last modification dates) are always correctly set on my side. Could you check if there are some related errors in nextcloud.log?
grep integration_onedrive /var/www/.../nextcloud/data/nextcloud.log
These touch()
calls are supposed to set last modification date and also trigger file size scan:
https://github.com/eneiluj/integration_onedrive/blob/5101d57a0adf0b04ee034f3d06e4c835ddbf3cd6/lib/Service/OnedriveStorageAPIService.php#L339-L341
So they are either
Sure, looks like chmod is failing for some reason and perhaps it's not reaching the touch?
An example, formatted and redacted (paths, base64 argument of unknown value) log entry below.
"Trace": [ { "function": "onError", "class": "OC\Log\ErrorHandler", "type": "::", "args": [ 2, "chmod(): Operation not permitted", "/var/www/html/lib/private/Files/Storage/Local.php", 91, { "path": "files/OneDrive import/xxx", "sourcePath": "/mnt/nextcloud/admin/xxx", "result": true } ] }, { "file": "/var/www/html/lib/private/Files/Storage/Local.php", "line": 91, "function": "chmod", "args": [ "/mnt/nextcloud/admin/xxx", 493 ] }, { "file": "/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php", "line": 85, "function": "mkdir", "class": "OC\Files\Storage\Local", "type": "->", "args": [ "files/OneDrive import/xxx" ] }, { "file": "/var/www/html/lib/private/Files/View.php", "line": 1168, "function": "mkdir", "class": "OC\Files\Storage\Wrapper\Wrapper", "type": "->", "args": [ "files/OneDrive import/xxx" ] }, { "file": "/var/www/html/lib/private/Files/View.php", "line": 272, "function": "basicOperation", "class": "OC\Files\View", "type": "->", "args": [ "mkdir", "/admin/files/OneDrive import/xxx", [ "create", "write" ] ] }, { "file": "/var/www/html/lib/private/Files/Node/Folder.php", "line": 175, "function": "mkdir", "class": "OC\Files\View", "type": "->", "args": [ "/admin/files/OneDrive import/xxx" ] }, { "file": "/var/www/html/custom_apps/integration_onedrive/lib/Service/OnedriveStorageAPIService.php", "line": 222, "function": "newFolder", "class": "OC\Files\Node\Folder", "type": "->", "args": [ "/xxx/xxx" ] }, { "file": "/var/www/html/custom_apps/integration_onedrive/lib/Service/OnedriveStorageAPIService.php", "line": 193, "function": "downloadDir", "class": "OCA\Onedrive\Service\OnedriveStorageAPIService", "type": "->", "args": [ "xxx", "admin", { "class": "OC\Files\Node\Folder" }, 500000000, 0, 0, 0, "/xxx/xxx", 7182963745, 491, { "/xxx/xxx": "todo", "/xxx/xxx": "todo", "/xxx/xxx": "todo", "/xxx/xxx/xxx": "todo", "/xxx/xxx/xxxs": "todo", "0": "And 3 more entries, set log level to debug to see all entries" } ] }, { "file": "/var/www/html/custom_apps/integration_onedrive/lib/Service/OnedriveStorageAPIService.php", "line": 132, "function": "importFiles", "class": "OCA\Onedrive\Service\OnedriveStorageAPIService", "type": "->", "args": [ "xxx", "admin", "/OneDrive import", 500000000, 7182963745, 491, { "/xxx/xxx": "todo", "/xxx/xxx": "todo", "/xxx/xxx": "todo", "/xxx/xxx/xxx": "todo", "/xxx/xxx/xxx": "todo", "0": "And 3 more entries, set log level to debug to see all entries" } ] }, { "file": "/var/www/html/custom_apps/integration_onedrive/lib/BackgroundJob/ImportOnedriveJob.php", "line": 36, "function": "importOnedriveJob", "class": "OCA\Onedrive\Service\OnedriveStorageAPIService", "type": "->", "args": [ "admin" ] }, { "file": "/var/www/html/lib/public/BackgroundJob/Job.php", "line": 80, "function": "run", "class": "OCA\Onedrive\BackgroundJob\ImportOnedriveJob", "type": "->", "args": [ { "user_id": "admin" } ] }, { "file": "/var/www/html/lib/public/BackgroundJob/QueuedJob.php", "line": 48, "function": "execute", "class": "OCP\BackgroundJob\Job", "type": "->", "args": [ { "class": "OC\BackgroundJob\JobList" }, { "class": "OC\Log" } ] }, { "file": "/var/www/html/cron.php", "line": 128, "function": "execute", "class": "OCP\BackgroundJob\QueuedJob", "type": "->", "args": [ { "class": "OC\BackgroundJob\JobList" }, { "class": "OC\Log" } ] } ],
Closing as stale
OneDrive integration: v1.0.1
Nextcloud: v21.0.1 Database: sqlite Other: docker swarm, data stored in /mnt/nextcloud which is an SMB shared mounted as a docker volume.
After importing data (which all appears to be there, great work!), the files show 0 bytes size in the web interface. Files uploaded using traditional means show the current file size.
The files all appear to have the correct content, despite showing 0 bytes in size.
After the import, running "occ files:scan" cleared the issue right up.