09-19-2019, 11:18 PM | #16 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@rtiangha: 2 backslashes.
That commit was simply meant as a reference to me messing up the regex twice today ^^. And to illustrate the fact that nickel could happily purge previously indexed content if you mess it up badly enough . The content of my earlier post is correct, and is what most users should care about, not me losing my mind in commit logs . EDIT: The live version of this block of code has been fixed to use less confusing escaping shenanigans . Last edited by NiLuJe; 09-19-2019 at 11:35 PM. |
09-19-2019, 11:54 PM | #17 | |
Wizard
Posts: 2,766
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
|
|
Advert | |
|
09-20-2019, 12:42 AM | #18 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That works when you happen to not need to escape square brackets, yeah .
Last edited by NiLuJe; 09-20-2019 at 09:45 AM. |
09-20-2019, 01:11 AM | #19 | ||
Evangelist
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
|
Quote:
Quote:
|
||
09-20-2019, 04:27 AM | #20 | |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
So we're deleting user files without asking now? What were they trying to fix and what's the point of it all... it's a mystery to me. |
|
Advert | |
|
09-20-2019, 09:06 AM | #21 |
Grand Sorcerer
Posts: 24,906
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
No, they are deleting details from the database for files that the import process can no longer find. Which is basically what has always been done. But, there is a new reason for not finding the file. Before, the file had to be deleted, renamed or moved. Now, we also have this filter changed to not be able to search where it is.
|
09-20-2019, 09:46 AM | #22 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yup, it basically trips the "oh no, file is gone" check, and it turns out that, besides purging the database, it also purges the actual file (which I assume is done as part of the process of deleting the associated sidecar/thumbnails), something which we had no really easy way to know/trigger before, as @davidfor just detailed the most common ways to trip that check, and they all involved the file being gone in the first place .
TL;DR: One could argue that borking the regex *was* in fact "asking for it" . Last edited by NiLuJe; 09-20-2019 at 09:59 AM. |
09-20-2019, 09:56 AM | #23 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Okay, I guess it makes sense to delete files (generated thumbnails and the like) in addition to database purging. It's just weird if they delete the non-generated stuff too... oh well.
|
09-21-2019, 05:25 AM | #24 | |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Quote:
Have you found the default value for ExcludeSyncFolders? I'd rather ignore hidden directories/files at any depth: Code:
[FeatureSettings] ExcludeSyncFolders=([^.][^/]*/)*\\..+ Last edited by baskerville; 10-06-2019 at 11:37 AM. |
|
09-21-2019, 08:23 AM | #25 | |
Wizard
Posts: 2,766
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
Last edited by geek1011; 09-21-2019 at 08:25 AM. Reason: Added offset |
|
09-21-2019, 10:56 AM | #26 | |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
I understood that. .kobo doesn't match the regexp. But why would we want that?
Quote:
Code:
(.kobo|koboExtStorage)/(articles|images|kepub|screensaver|slideshow|dict|certificates|webcache|webstorage)|.fseventsd|.Spotlight-V100|.Trash|.Trashes|.Trash-\\d+|\\$RECYCLE.BIN |
|
09-21-2019, 11:14 AM | #27 | |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
Code:
Sep 21 17:08:42 nickel: ( 22.221 @ 0x12dd9c0 / ui.debug) void SyncFileSystemCommand::findFilesToParse(const QString&, QStringList&) skipping "/mnt/onboard/.adobe-digital-editions" , matches "\x00|/\.|\x00" Last edited by frostschutz; 09-21-2019 at 11:16 AM. |
|
09-21-2019, 11:17 AM | #28 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@frostschutz: You'll have to walk me through that one... o_O .
EDIT: Thanks! Ooh, that's sneaky xD. EDIT²: Thankfully, as we found out with the preload hack, blacklisting a toplevel hidden folder is enough to make it entirely non-traversable. But this could still be useful for more esoteric directory structures ... @baskerville: Yeah, the idea was to let the default patterns do their stuff for adobe/kobo folders. Again, not 100% convinced it makes any difference in practice (at least for my use cases), in which case, (EDIT: a top-level only variant of) what you proposed (i.e., \..*? [-> \\..*? in the config] once you account for the full pattern) works just fine. Last edited by NiLuJe; 09-21-2019 at 12:48 PM. Reason: Oops, fixed it. |
09-21-2019, 12:26 PM | #29 |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Thanks. Please note that this isn't the regexp I've suggested: I also want to ignore the hidden directories inside the visible directories.
|
09-21-2019, 12:46 PM | #30 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@baskerville: Yep, I should have made that clearer. Would your example work, given the "sandwich", or would that need some trickery like @frostschutz did?
(I'm not completely terrible at regexps, but I'm no wizard either, so, err, small words, please ;p). EDIT: If I put my brain in "regexp mode", I think it looks fine for that purpose, but I haven't tested it . (i.e., accepts zero or more "classic" directories in front of an hidden one). EDIT²: The first group might fail to match for a single-character folder name, though, right? Last edited by NiLuJe; 09-21-2019 at 12:56 PM. |
Tags |
hack, hidden, import, kobo, ldpreload |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to prevent replacement of cover.jpg in kepubs when sending to Kobo e-reader? | JeanPierre | Kobo Reader | 2 | 01-20-2019 04:57 AM |
Kobo should be incapable to prevent the publishing of a stolen epub? | bathop | General Discussions | 36 | 06-04-2016 05:49 PM |
Arc Importing to Kobo Arc | Roadkill | Kobo Tablets | 2 | 08-04-2013 07:18 AM |
Dragging and Dropping Folders to Kobo | david_e | Kobo Reader | 2 | 10-24-2012 06:20 PM |