/* we should allocate a drive letter automatically. We also need some way to let the user choose the mapping point,
for now we will just force them to enter a path automatically, with / being the default. In future we should
be able to temporarily map / then invoke the directory chooser dialog. */
charnewLetter='D';/* we skip A, B and of course C is already mapped, right? */
longmask=~drive_available_mask(0);/* the mask is now which drives aren't available */
char*sectionName;
while(mask&(1<<(newLetter-'A'))){
newLetter++;
if(newLetter>'Z'){
MessageBox(NULL,"You cannot add any more drives.\n\nEach drive must have a letter, from A to Z, so you cannot have more than 26","",MB_OK|MB_ICONEXCLAMATION);
return;
}
}
WINE_TRACE("allocating drive letter %c\n",newLetter);
sectionName=malloc(strlen("Drive X")+1);
sprintf(sectionName,"Drive %c",newLetter);
addTransaction(sectionName,"Path",ACTION_SET,"/");/* default to root path */