| 43 | // So here we git rid of that extra slash if necessary. |
| 44 | |
| 45 | void FileNameEnc::AssignPlainPath(LPCWSTR plain_path) { |
| 46 | |
| 47 | m_plain_path = plain_path; |
| 48 | |
| 49 | // The bug mentioned above is now fixed in Dokany. The fix should be in Dokany 1.04. |
| 50 | // When Dokany 1.04 comes out, we should verify that the fix is actually there |
| 51 | // and use the version to determine if we still need to do this or not. |
| 52 | // But it won't hurt to leave this code in. |
| 53 | |
| 54 | LPCWSTR pColon = wcschr(plain_path, ':'); |
| 55 | |
| 56 | if (!pColon) |
| 57 | return; |
| 58 | |
| 59 | if (pColon == plain_path) |
| 60 | return; |
| 61 | |
| 62 | if (pColon[-1] != '\\') |
| 63 | return; |
| 64 | |
| 65 | m_plain_path.erase(pColon - plain_path - 1); |
| 66 | |
| 67 | m_plain_path += pColon; |
| 68 | |
| 69 | DbgPrint(L"converted file with stream path %s -> %s\n", plain_path, |
| 70 | m_plain_path.c_str()); |
| 71 | } |
| 72 | |
| 73 | FileNameEnc::FileNameEnc(PDOKAN_FILE_INFO DokanFileInfo, const WCHAR *fname, |
| 74 | string *actual_encrypted, |