Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-04-2018, 12:47 PM   #1
Phssthpok
Addict
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 341
Karma: 95229
Join Date: Nov 2014
Device: Horrible Kindle
Disappearing temp files in Windows

Recently, while editing several different books on Windows 10, I've hit "save" and been greeted by an error message tell me that META-INF/container.xml in the temp directory (somewhere in AppData/Local) is not found, and the file is then basically toast. Sometimes it's just the container.xml that's vanished, which I can manually recover (but it involves unzipping what's left of the epub and adding it manually, which is an annoying and long-winded process) but sometimes all the images are gone as well. Presumably there's something that's cleaning the temp directory that wasn't there a few Windows updates ago, or anti-virus updates or something. (Anyone know what it could be?)

Is there a fix for this that anyone can suggest, e.g. specifying a different temp directory? And if I do something like that, will the temp files be deleted when I close the editor or would I have to clean them manually?
Phssthpok is offline   Reply With Quote
Advert
Old 02-04-2018, 05:58 PM   #2
AnotherCat
Me
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,011
Karma: 9500312
Join Date: May 2012
Device: Anything
I cannot remember the exact error messages but I occasionally experience much the same. If I recall correctly a number of people, including myself, experienced this a few years back and then it went away; it has returned for me over the last month or two.

I have not troubled myself finding a fix due to the occasional nature of the issue and because I found a simple work around that works 100% for me. When I cannot do a normal save due to the issue, in Editor I do a File>Save As to hard drive, then delete the copy in Calibre, load the "Save As" copy into Calibre then open that in Editor. It works for me with no loss of any previous edits.
AnotherCat is offline   Reply With Quote
Old 02-04-2018, 06:08 PM   #3
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 9,673
Karma: 8412395
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Try giving calibre a dedicated location for its temporary files via the CALIBRE_TEMP_DIR environment variable, see Calibre User Manual - Environment variables

Which version of Win 10. In 1709 there's a new feature, "Controlled Folder Access", that 'stops' programs using some folder operations - like opening them! Its a means of thwarting ransomware attacks. Might be worth checking out if its enabled. I think you have to opt-in to make use of it, and I have NOT heard of it deleting anything.

However there are 3rd party tools that attempt to do 'garbage collection' of the Temp directory, wouldn't surprise me if an AV vendor or something similar added such a feature - which you have to opt-out of Ψ²

BR
BetterRed is offline   Reply With Quote
Old 02-04-2018, 10:40 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 32,222
Karma: 9820640
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just specify a different temp dir one that's hopefully not auto-cleaned and you will be fine. In the next release of calibre, I have added code to use the cache dir rather than the temp dir for temp files to avoid this issue with temp file cleaners.
kovidgoyal is offline   Reply With Quote
Old 02-04-2018, 10:55 PM   #5
AnotherCat
Me
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,011
Karma: 9500312
Join Date: May 2012
Device: Anything
Quote:
Originally Posted by BetterRed View Post
...Which version of Win 10. In 1709 there's a new feature, "Controlled Folder Access", that 'stops' programs using some folder operations - like opening them! Its a means of thwarting ransomware attacks. Might be worth checking out if its enabled. I think you have to opt-in to make use of it, and I have NOT heard of it deleting anything...
One has to opt in to "Controlled Folder Access".
AnotherCat is offline   Reply With Quote
Old 02-05-2018, 04:50 AM   #6
Phssthpok
Addict
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 341
Karma: 95229
Join Date: Nov 2014
Device: Horrible Kindle
Quote:
Originally Posted by AnotherCat View Post
I have not troubled myself finding a fix due to the occasional nature of the issue and because I found a simple work around that works 100% for me. When I cannot do a normal save due to the issue, in Editor I do a File>Save As to hard drive, then delete the copy in Calibre, load the "Save As" copy into Calibre then open that in Editor. It works for me with no loss of any previous edits.
I already tried that, and container.xml had already vanished. Seems like the original "save" attempt lost it somehow.
Phssthpok is offline   Reply With Quote
Old 02-05-2018, 04:52 AM   #7
Phssthpok
Addict
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 341
Karma: 95229
Join Date: Nov 2014
Device: Horrible Kindle
Quote:
Originally Posted by BetterRed View Post
Try giving calibre a dedicated location for its temporary files via the CALIBRE_TEMP_DIR environment variable, see Calibre User Manual - Environment variables
BR
OK, thanks.
Phssthpok is offline   Reply With Quote
Old 02-05-2018, 04:53 AM   #8
Phssthpok
Addict
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 341
Karma: 95229
Join Date: Nov 2014
Device: Horrible Kindle
Quote:
Originally Posted by kovidgoyal View Post
Just specify a different temp dir one that's hopefully not auto-cleaned and you will be fine. In the next release of calibre, I have added code to use the cache dir rather than the temp dir for temp files to avoid this issue with temp file cleaners.
I look forward to it eagerly!
Phssthpok is offline   Reply With Quote
Old 02-05-2018, 05:20 PM   #9
AnotherCat
Me
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,011
Karma: 9500312
Join Date: May 2012
Device: Anything
Quote:
Originally Posted by Phssthpok View Post
I already tried that, and container.xml had already vanished. Seems like the original "save" attempt lost it somehow.
OK, maybe the issue I occasionally get is different, I'll pay more attention to the error message when it happens again - I never bother to pay it much attention as they have been few and far between and the quick work around has always sorted it for me from way back.

Regarding temp folders, the issue I (and I think everyone else) has is all the dross that collects in them that is never automatically cleaned out. I know Kovid's Calibre one will remain super-clean though .
AnotherCat is offline   Reply With Quote
Old 02-05-2018, 10:51 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 32,222
Karma: 9820640
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah calibre always deletes its temp files on exit, unless it crashes. And with the change to use the cache dir for the editor/viewer I have even added code to have those programs delete any left over temp files from a crash on startup as well.
kovidgoyal is offline   Reply With Quote
Reply

Tags
temp folders

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows deleting Viewer's temp files? Steven Karp Calibre 5 10-28-2017 06:14 PM
Calibre temp files keep disappearing lawnparty Calibre 9 09-04-2015 05:47 AM
Temp files cleanup kiwidude Development 2 03-05-2011 11:56 AM
Temp files... BadGandalf Calibre 17 10-24-2010 12:38 PM
Temp files Jeff L Calibre 3 10-14-2010 06:58 PM


All times are GMT -4. The time now is 06:13 PM.


MobileRead.com is a privately owned, operated and funded community.