Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 1963

Diskfree Error Message

$
0
0

Windows 10, Delphi 10 Starter

Hi, I posted this question back in April, but although I got 389 views, I got no replies. This is presumably because the fix is trivial. Anyway, I will ask once more and see if someone is kind enough to put me out of misery. I'll try to phrase it better in case that was the problem.

I have written an app that backs up certain folders on my boot drive to various internal and external drives. I generate a list of the drives on the system, so I can choose which additional drive to back up to at any particular time. The list includes my two optical drives. On launch the application checks the amount of free space on all the drives, and is happy to identify the two opticals as having no space - I haven't included writing to CDs in my app. 

I tested the app with a CD in one of the drives to see what would happen. Again, the code handled this fine. I then removed the CD, ran the app again, and this time instead of simply identifying the drive as an optical with no free space as it did on first launch, I got the message in the grab below. I agree the statement that there is no media in the drive is correct, but I want it to be handled in the same way as a launch without media in the drive in the first place. It seems that having once had media in the drive, Diskfree() expects that media to still be in the drive the next time I call the function, and raises the exception if it isn't. Or I am being really stupid?

 

Many thanks.

No Disk Exception


Viewing all articles
Browse latest Browse all 1963

Trending Articles