From d2430323b26f61035bcbc91751f1892906819e2a Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Sun, 20 Aug 2023 13:57:18 -0700 Subject: [PATCH] Fixed bug in `gam collect orphans` where shortcuts were being created unnecessarily --- docs/GamUpdates.md | 5 +++++ src/GamUpdate.txt | 5 +++++ src/gam/__init__.py | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 983867d8..2f03b569 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,11 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation. +### 6.63.02 + +Fixed bug in `gam collect orphans` where shortcuts were being created unnecessarily +when `useshortcuts` was false; either by default or when explicitly set. + ### 6.63.01 Added `process_wait_limit` variable to `gam.cfg` that controls how long (in seconds) GAM should wait for all batch|csv processes to complete diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index edce8785..e13bc8a0 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,11 @@ Merged GAM-Team version +6.63.02 + +Fixed bug in `gam collect orphans` where shortcuts were being created unnecessarily +when `useshortcuts` was false; either by default or when explicitly set. + 6.63.01 Added `process_wait_limit` variable to `gam.cfg` that controls how long (in seconds) GAM should wait for all batch|csv processes to complete diff --git a/src/gam/__init__.py b/src/gam/__init__.py index afbdc45c..719ca409 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -56565,7 +56565,7 @@ def collectOrphans(users): pageMessage=getPageMessageForWhom(), throwReasons=GAPI.DRIVE_USER_THROW_REASONS, retryReasons=[GAPI.UNKNOWN_ERROR], - q=query, orderBy=OBY.orderBy, fields='nextPageToken,files(id,name,parents,mimeType,capabilities(canAddMyDriveParent))', + q=query, orderBy=OBY.orderBy, fields='nextPageToken,files(id,name,parents,mimeType,capabilities(canMoveItemWithinDrive))', pageSize=GC.Values[GC.DRIVE_MAX_RESULTS]) if targetUserFolderPattern: trgtUserFolderName = _substituteForUser(targetUserFolderPattern, user, userName) @@ -56609,7 +56609,7 @@ def collectOrphans(users): # if fileType == Ent.DRIVE_FOLDER and not fileEntry['capabilities']['canAddMyDriveParent']: # # Typically Google Backup & Sync images of laptops # continue - if not useShortcuts and fileEntry['capabilities']['canAddMyDriveParent']: + if not useShortcuts and fileEntry['capabilities']['canMoveItemWithinDrive']: if csvPF: csvPF.WriteRow({'Owner': user, 'type': Ent.Singular(fileType), 'id': fileId, 'name': fileName, 'action': 'changeParent'}) continue