| 10939 | } |
| 10940 | |
| 10941 | VarSizeType Script::GetLoopFileShortPath(char *aBuf) |
| 10942 | // Unlike GetLoopFileShortName(), this function returns blank when there is no short path. |
| 10943 | // This is done so that there's a way for the script to more easily tell the difference between |
| 10944 | // an 8.3 name not being available (due to the being disabled in the registry) and the short |
| 10945 | // name simply being the same as the long name. For example, if short name creation is disabled |
| 10946 | // in the registry, A_LoopFileShortName would contain the long name instead, as documented. |
| 10947 | // But to detect if that short name is really a long name, A_LoopFileShortPath could be checked |
| 10948 | // and if it's blank, there is no short name available. |
| 10949 | { |
| 10950 | char buf[MAX_PATH] = ""; // Set default. |
| 10951 | DWORD length = 0; // Set default. |
| 10952 | if (mLoopFile) |
| 10953 | // The loop handler already prepended the script's directory in cFileName for us: |
| 10954 | if ( !(length = GetShortPathName(mLoopFile->cFileName, buf, sizeof(buf))) ) |
| 10955 | *buf = '\0'; // It might fail if NtfsDisable8dot3NameCreation is turned on in the registry, and possibly for other reasons. |
| 10956 | if (aBuf) |
| 10957 | strcpy(aBuf, buf); |
| 10958 | return (VarSizeType)length; |
| 10959 | } |
| 10960 | |
| 10961 | VarSizeType Script::GetLoopFileTimeModified(char *aBuf) |
| 10962 | { |