Skip to content

Commit de534d9

Browse files
committed
issue #306
Fixed: file execution from remote FS broken (wrong condition set when checking streaming parameters).
1 parent 15de8a8 commit de534d9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

models/wfx/MailRuCloudWFX.pas

+5-3
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ function TMailRuCloudWFX.FsDisconnect(DisconnectRoot: PWideChar): Boolean;
881881
function TMailRuCloudWFX.FsExecuteFile(MainWin: THandle; RemoteName, Verb: PWideChar): Integer;
882882
var
883883
RealPath: TRealPath;
884+
TargetStreamingSettings: TStreamingSettings;
884885
begin
885886
RealPath.FromPath(RemoteName);
886887

@@ -902,9 +903,10 @@ function TMailRuCloudWFX.FsExecuteFile(MainWin: THandle; RemoteName, Verb: PWide
902903
if Verb = VERB_OPEN then
903904
begin
904905
if (not(RealPath.isDir = ID_True)) then
905-
exit(ExecuteFileStream(RealPath, SettingsManager.GetStreamingSettings(RealPath.Path)))
906-
else
907-
exit(FS_EXEC_YOURSELF);
906+
TargetStreamingSettings := SettingsManager.GetStreamingSettings(RealPath.Path);
907+
if (TargetStreamingSettings.Format <> STREAMING_FORMAT_UNSET) and (TargetStreamingSettings.Format <> STREAMING_FORMAT_NONE) then
908+
exit(ExecuteFileStream(RealPath, TargetStreamingSettings));
909+
exit(FS_EXEC_YOURSELF);
908910
end;
909911

910912
if copy(Verb, 1, 5) = VERB_QUOTE then

0 commit comments

Comments
 (0)