I have two things I’d like to discuss regarding file deletion:
-
In case of a remote to local delete the file is just deleted locally. Instead, I would like all these files to be moved to the native macOS trash can, except of course for placeholders. The same goes for directories.
That would be very convenient and feels safer. This is what Google Backup and Sync does. -
In case I attempt to delete a file that is not owned by me, odrive gets stuck in a loop of retrying the delete forever.
I have read Empty trash and sync all deletes - NOT working?, so I know that it’s not odrive’s fault that the call fails. However, instead of retrying forever and spamming the log with lots of repeating messages I think odrive should just restore the file if it is not owned by the current user and write an informative log message.
I am using version 7167 (Mac).
main.log:
06 Oct 04:13:55PM INFO Discovered: Local delete of /Users/richard/odrive/Google Drive/A/B/C/test1.txt. Adding this item to the odrive trash.
06 Oct 04:14:00PM INFO Running automatic trash process.
06 Oct 04:14:00PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:14:15PM INFO Running automatic trash process.
06 Oct 04:14:16PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:14:31PM INFO Running automatic trash process.
06 Oct 04:14:31PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:14:47PM INFO Running automatic trash process.
06 Oct 04:14:47PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:15:02PM INFO Running automatic trash process.
06 Oct 04:15:03PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:15:18PM INFO Running automatic trash process.
06 Oct 04:15:19PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:15:34PM INFO Running automatic trash process.
06 Oct 04:15:35PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:15:50PM INFO Running automatic trash process.
06 Oct 04:15:51PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)
06 Oct 04:16:06PM INFO Running automatic trash process.
06 Oct 04:16:06PM ERROR Failed Delete File (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/test1.txt - Size: NA - Date: NA - Error: code GD_EDIT_PERMISSION_DENIED caused by GoogleDriveApiException(httpStatus 403 - {
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Insufficient permissions for this file",
"locationType": "other",
"location": "file.permissions"
}
],
"code": 403,
"message": "Insufficient permissions for this file"
}
}
- forbidden)