08-12-2017, 08:31 AM | #1 |
Member
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: iPad Pro 10.5
|
3.6 Save to Disk Pops Debugging Command Window
In 3.6, If I choose several books and Save To Disk in a Single Directory, a Command Window pops open with "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Apps - General\calibre 64bit - E-book Management>rem Src: https://stackoverflow.com/questions/5185030/drag-and-drop-batch-file-for-multiple-files/5192427#5192427" and awaits "Press any key...".
|
08-12-2017, 08:51 AM | #2 |
Member
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: iPad Pro 10.5
|
Solved - Does this Indicate a Bug in Calibre?
I fixed this by deleting a script that I had created in "C:\Users\Username\Downloads\Test.bat" that contained the line "rem Src: https://stackoverflow.com/questions/5185030/drag-and-drop-batch-file-for-multiple-files/5192427#5192427". Note that I was Saving to Disk in a Single Directory "C:\Users\Username\Downloads\Test" when that command window popped open.
Why would saving books to directory "C:\Users\Username\Downloads\Test" cause execution of a batch file at "C:\Users\Username\Downloads\Test.bat"? |
08-13-2017, 02:32 AM | #3 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre most definitely does not execute anything when saving books to disk.
|
08-14-2017, 10:07 AM | #4 |
Member
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: iPad Pro 10.5
|
I was able to recreate the behavior. I created C:\Users\Username\Downloads\test.bat whose contents were:
REM 12345 PAUSE I then Saved to Disk in a Single Directory and selected the "C:\Users\Username\Downloads\Test" folder. After the books are saved to disk, I get a Command Window with: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Apps - General\calibre 64bit - E-book Management>rem 12345 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Apps - General\calibre 64bit - E-book Management>PAUSE Press any key to continue . . . |
08-14-2017, 10:37 AM | #5 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Saving to disk opens the target folder after saving. Which is done by passing the folder path to windows. Since you have a test.bat file and test folder, when calibre asks windows to open the folder it executes the bat file instead, which presumably happens because microsoft thought it a good idea to execute files with .exe/.bat and .cmd extensions even when the full filename with extension is not supplied. Given that microsoft also thought having magic filenames in their filesystems sunch as NUL and COM was a good idea, I'm not surprised.
|
08-14-2017, 10:49 AM | #6 |
Member
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: iPad Pro 10.5
|
Thank you for the explanation. Now it makes sense.
|
08-15-2017, 12:14 AM | #7 | |
Bibliophagist
Posts: 35,356
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
08-15-2017, 12:21 AM | #8 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont blame microsoft, there were probably good reasons for it at the time, and their committment to backward compatibility is admirable. I'm just saying that given that the windows filesystem is full of these kinds of traps, it's not surprising to add one more to the list.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Debugging the screen | Calenorn | General Discussions | 7 | 04-04-2017 02:56 PM |
Spell Checker window on top of Editor window | Calibre-Fan | Editor | 3 | 01-30-2016 11:48 AM |
Opening a new window in calibre, and closing another window | Dr. Drib | Calibre | 3 | 02-23-2012 09:27 AM |
Debugging Password | kaitorii | enTourage Archive | 4 | 11-14-2010 09:34 AM |
iLiad Debugging and the iLiad | scotty1024 | iRex Developer's Corner | 2 | 10-23-2006 03:43 PM |