logDebug ("copy %s -> %s\r\n", srcname, fname);
logDebug ("copy %s -> %s\n", srcname, fname);
MapiGPGMEImpl::saveDecryptedAttachment (HWND root, const char *srcname)				     {    char filter[] = "All Files (*.*)|*.*||";    char fname[MAX_PATH+1];    char *p;    OPENFILENAME ofn;    for (size_t i=0; i< strlen (filter); i++)  {	if (filter[i] == '|')	    filter[i] = '\0';    }    memset (fname, 0, sizeof (fname));    p = strstr (srcname, ATT_PREFIX);    if (!p)	strncpy (fname, srcname, MAX_PATH);    else {	strncpy (fname, srcname, (p-srcname));	strcat (fname, srcname+(p-srcname)+strlen (ATT_PREFIX));	    }    memset (&ofn, 0, sizeof (ofn));    ofn.lStructSize = sizeof (ofn);    ofn.hwndOwner = root;    ofn.lpstrFile = fname;    ofn.nMaxFile = MAX_PATH;    ofn.lpstrFileTitle = NULL;    ofn.nMaxFileTitle = 0;    ofn.Flags |= OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;    ofn.lpstrTitle = "GPG - Save decrypted attachments";    ofn.lpstrFilter = filter;    if (GetSaveFileName (&ofn)) {	logDebug ("copy %s -> %s\r\n", srcname, fname);	return CopyFile (srcname, fname, FALSE) == 0? false : true;    }    return true;}