View Single Post
Old 06-14-2023, 04:55 PM   #1
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 6,955
Karma: 27060153
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
Issue with OneDrive update (macOS)

Somewhere in last few months, Microsoft has started naming the 'real' folder name to OneDrive-Personal (I guess to distinguish it from OneDrive Enterprise). It used to be just /OneDrive.


In Finder, one still sees 'OneDrive' in Locations, and if you Go To Folder /Users/username/Library/CloudStorage/. So it's some sort of Finder alias.

Full path name on macOS is:
Code:
/Users/[accountname]/Library/CloudStorage/OneDrive-Personal
It still shows the folder name as 'OneDrive' in Finder Locations.

When starting calibre, I was getting 'cannot find catalog' error, which proposed creating a new catalog, which I did not want to do. So I was quitting calibre, and somehow stumbled on gui.json, where I discovered two entries (I think order was reversed):

Code:
  "library_usage_stats": {
    "/Users/thomas/Library/CloudStorage/OneDrive-Personal/calibre": 19,
    "/Users/thomas/Library/CloudStorage/OneDrive/calibre": 384
  },
"Obviously," I told myself, "that OneDrive-Personal path is wrong". I removed it, calibre launched without error. But only until the next launch.

Then I discovered that cancelling the error dialog opened the existing location and I was able to just click Open. But continued to present error on each launch.

Finally googled OneDrive-Personal and realized I had been removing the wrong entry. I removed the (incorrect) '/OneDrive/', and since doing this, calibre has been launching without error.

However, the (incorrect) '/OneDrive/' entry is getting restored for some reason. It's apparently not causing problems because evidently calibre is able to update library usage stat for the correct location without tripping over it. But JSON doesn't define 'order' and so json package would not be wrong to read it in to Python dict in the other order, and then error will recur.

Is there some way to keep the incorrect entry from getting restored? I'm looking at files in /Users/thomas/Library/Preferences/calibre and don't see any other instance of '/OneDrive/' string in any of the files there.

Last edited by tomsem; 06-14-2023 at 05:43 PM.
tomsem is offline   Reply With Quote