Skip to content

[plugin] Gestures, Hotkeys: attempt to work around corrupted gestures file#13054

Merged
Frenzie merged 2 commits into
koreader:masterfrom
Frenzie:13009-corrupt-gestures
Jan 13, 2025
Merged

[plugin] Gestures, Hotkeys: attempt to work around corrupted gestures file#13054
Frenzie merged 2 commits into
koreader:masterfrom
Frenzie:13009-corrupt-gestures

Conversation

@Frenzie

@Frenzie Frenzie commented Jan 12, 2025

Copy link
Copy Markdown
Member

See #13009 for details.

LuaSettings attempts to read a backup if the main doesn't work. If that doesn't work it returns an empty data table. But gestures expects there to be defaults inside.


This change is Reviewable

@Commodore64user

Copy link
Copy Markdown
Member

Should hotkeys get the same attention?

@Frenzie Frenzie force-pushed the 13009-corrupt-gestures branch from 0c90042 to 7fcf1e2 Compare January 12, 2025 17:15
@Frenzie

Frenzie commented Jan 12, 2025

Copy link
Copy Markdown
Member Author

Should hotkeys get the same attention?

Assuming this is the right approach then yes, I'll add it there if it copied the same code. But how it could actually happen is a bit of a mystery. Perhaps it was Kindle's infamous FUSE situation. In pretty much all cases except first launch there'll be a valid gestures.old file so the worst that'll happen is that you'll lose recent changes.

@Frenzie Frenzie force-pushed the 13009-corrupt-gestures branch from 4554869 to 349d5bd Compare January 12, 2025 17:23
@Frenzie Frenzie changed the title [plugin] Gestures: attempt to work around corrupted gestures file [plugin] Gestures, Hotkeys: attempt to work around corrupted gestures file Jan 12, 2025

@Commodore64user Commodore64user left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Comment thread plugins/hotkeys.koplugin/main.lua Outdated
… file

See koreader#13009 for details.

LuaSettings attempts to read a backup if the main doesn't work. If that doesn't work it returns an empty `data` table. But gestures expects there to be defaults inside.
@Frenzie Frenzie force-pushed the 13009-corrupt-gestures branch from 349d5bd to b68dd22 Compare January 12, 2025 17:39
Comment thread plugins/gestures.koplugin/main.lua Outdated
@Frenzie Frenzie added this to the 2025.01 milestone Jan 12, 2025
@Frenzie Frenzie merged commit 6792bb0 into koreader:master Jan 13, 2025
@Frenzie Frenzie deleted the 13009-corrupt-gestures branch January 13, 2025 07:31
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
… file (koreader#13054)

See koreader#13009 for details.

LuaSettings attempts to read a backup if the main doesn't work. If that doesn't work it returns an empty `data` table. But gestures expects there to be defaults inside.
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.

4 participants