Skip to content

Commit

Permalink
Merge pull request elfmz#2541 from exkrexpexfex/master
Browse files Browse the repository at this point in the history
Crash on concurrent access to temp directory
  • Loading branch information
elfmz authored Dec 3, 2024
2 parents 2c03f3a + 2e2b60a commit 1af0cec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions far2l/src/findfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,18 +1173,16 @@ static void AnalyzeFileItem(HANDLE hDlg, PluginPanelItem *FileItem, const wchar_

FARString FileToScan;
if (hPlugin != INVALID_HANDLE_VALUE) {
PluginLocker Lock;
if (!CtrlObject->Plugins.UseFarCommand(hPlugin, PLUGIN_FARGETFILES)) {
FARString strTempDir;
FarMkTempEx(strTempDir);
apiCreateDirectory(strTempDir, nullptr);

bool GetFileResult = false;
{
PluginLocker Lock;
GetFileResult = CtrlObject->Plugins.GetFile(hPlugin, FileItem, strTempDir, FileToScan,
GetFileResult = CtrlObject->Plugins.GetFile(hPlugin, FileItem, strTempDir, FileToScan,
OPM_SILENT | OPM_FIND)
!= FALSE;
}
if (!GetFileResult) {
apiRemoveDirectory(strTempDir);
return;
Expand Down

0 comments on commit 1af0cec

Please sign in to comment.