View Single Post
Old 10-28-2012, 11:52 PM   #7
BetterRed
null operator (he/him)
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: 21,786
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
My Calibre Library is on an internal hard disk, I don't use Dropbox or anything like it, I run Calibre on a standalone system. I dont have any SSD's, or RAM Disks and the databases are within the relevant library folders and there are no hard, soft or alias links to them - i.e a vanilla, white bread installation.

The drive where I have the Calibre libraries has thousands of hardlinks (unrelated to Calibre - related to analysis of telemetry data). Some files have 1023 (the maximum) hardlinks so that I've had to create second instances of the data. I have some NTFS drives that I mount as needed in a disk dock, two of those disks also have lots of hardlinks - some of which were created under NT3.51 in 1998. They all work.

Since Vista (maybe XP, can't remember) every Windows system has Windows\winsxs folder, 90% of the files in there are hardlinks to file elsewhere, I've seen files with up to 6 links in there. And there are over 11,000 subfolders in my winsxs folder.

Even lowly notepad.exe has four hardlinks

Code:
C:\Windows\notepad.exe
C:\Windows\winsxs\amd64_microsoft-windows-notepadwin_31bf3856ad364e35_6.1.7600.16385_none_9ebebe8614be1470\notepad.exe
C:\Windows\winsxs\amd64_microsoft-windows-notepad_31bf3856ad364e35_6.1.7600.16385_none_cb0f7f2289b0c21a\notepad.exe
C:\Windows\System32\notepad.exe
I've attached an image of a fragment of my Windows/System32 directory (which is where much of Windows lives), the little red arrows you see on the most of the icons indicates that the file has as least one other hardlink somewhere.

If you copy a file in Explorer from one folder to another on the same drive, then by default Explorer will Move the file by creating a hardlink at the new location and trashing the hardlink in the old location. You have to go out of your way to actually copy the file - ie do a cut & paste or a right click drag drop and select Copy. If Windows hardlinks didn't work then nor would Windows, so to suggest hardlinks may not work on Windows is a really big call. Some programs I wrote for NT3.51 manipulate hardlinks. They are working today, and the modify date on the relevant .cpp hasn't changed for over 12 years.

I very much doubt hardlinks have anything to do with the problem I originally described. I just changed the title on 521 books - worked perfectly - and fast, 10-20 secs at a guess. How much faster than before - dunno, never did it before.

If I try to copy a file into a book that already has a file of that type, and the existing file is open in an editor then I get a Permission Denied error message, the old file remains in the book, and any temporary files created by the editor remain where they are - in other words the 'request to replace the file' is rejected, quite rightly so

IMO that's what should happen if I try to change the title or author of a book that has one of its files open for editing. The Calibre database should keep the existing title and author, and Calibre should not delete temporary files the editing program created - which it does. And I don't believe I should end up with book file names that don't match the folder name and/or the Calibre title and author names.

If I created such a situation because of renaming things in Explorer and complained about something not working - then theducks and Dr NoNo etc would, quite rightly, be very with me.

BR
Attached Thumbnails
Click image for larger version

Name:	sreenshot.jpg
Views:	289
Size:	147.8 KB
ID:	95111  

Last edited by BetterRed; 10-29-2012 at 12:50 AM. Reason: attachment went AWOL
BetterRed is offline   Reply With Quote