Archive: Question about $PLUGINSDIR


Question about $PLUGINSDIR
Without finding the relevent section in the source, I couldn't see an obvious way of finding this out. I need to know if in Windows the $PLUGINSDIR target drive is checked to make sure it has enough space on it before the temporary directory is created. For example, if C: has no more space on it, will an error occur, or will it seek for another drive and check if that is big enough or what?

Thanks

Rob G


It always uses the temporary directory. The temporary directory is either the system temporary directory or $WINDIR\Temp if the temporary directory is invalid. There is no space check for that.

The source code can be found in CEXEBuild::add_plugins_dir_initializer() in build.cpp.


Hmmm I'm tempted to add a check in if I can work it out reasonably quickly. Anyone got any pointers to Windows API calls to query space left on a drive, and how to find out what drives exist on a machine?

Also I'd need to know how to sum the size of the files placed in the $PLUGINSDIR...anyone fancy doing this for me? :)


SHGetDiskFreeSpaceA("c", ...) - shell32.dll ;)