Zhorn Software
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down

Close file handle when not writing? Empty Close file handle when not writing?

Thu May 30, 2024 8:14 pm

Could you close the file handle when you are not writing to the SQLite db?

Use Case:

My stickies app dir is portable so the exe and db are stored on my OneDrive folder so that it automatically backs it up to the cloud. If the file handle for the db is left open for write, the file doesn't upload to the cloud.

Thank you! Smile
Posts : 536
Join date : 2018-03-30
Location : London

Close file handle when not writing? Empty Re: Close file handle when not writing?

Sun Jun 02, 2024 5:38 pm
I hear you - but I worry about the file going away during operation, and handling the very fatal error that's going to produce.  By holding the file open, I can be sure that's not happening.  As a suggestion - you could set the app to write a backup every couple of hours, and that will drop a file which isn't held open which OD can grab.

If you try copying the database file, you'll find it's possible without closing the app first.  That's actually all the "backup" feature does.  I'd almost say this sounds more like a problem with OD than Stickies, seeing as it's possible to read the file... :/

Back to top
Permissions in this forum:
You can reply to topics in this forum