Skip to content

Commit

Permalink
File manager fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Muhandis committed Aug 14, 2020
1 parent a7e2340 commit 03ba287
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configuration.pas
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function TConfig.GetBotTooken: String;

function TConfig.GetDefaultDir: String;
begin
Result:=FIni.ReadString('File', 'DefaultDir', GetCurrentDir);
Result:=FIni.ReadString('File', 'DefaultDir', PathDelim);
end;

function TConfig.GetHTTPProxyHost: String;
Expand Down
9 changes: 6 additions & 3 deletions shellthread.pas
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,17 @@ procedure TShellThread.BotReceiveMessage(ASender: TObject;
end;

procedure TShellThread.BotReceiveCallbackQuery(ASender: TObject; ACallback: TCallbackQueryObj);
var
aName: String;
begin
if not CommandStart then
Exit;
FIsCallBack:=True;
aName:=RightStr(ACallback.Data, Length(ACallback.Data)-Length(dt_dir)-1);
case ExtractWord(1, ACallback.Data, [' ']) of
dt_script: CallbackScript(ExtractWord(2, ACallback.Data, [' ']));
dt_dir: CallbackDir(ACallback.Message.Text, ExtractWord(2, ACallback.Data, [' ']));
dt_file: CallbackFile(ACallback.Message.Text, ExtractWord(2, ACallback.Data, [' ']));
dt_script: CallbackScript(aName);
dt_dir: CallbackDir(ACallback.Message.Text, aName);
dt_file: CallbackFile(ACallback.Message.Text, aName);
end;
end;

Expand Down
4 changes: 2 additions & 2 deletions tgshd.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="tgshd"/>
<Filename Value="$(TargetCPU)-$(TargetOS)\tgshd"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
Expand Down Expand Up @@ -89,7 +89,7 @@
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="tgshd"/>
<Filename Value="$(TargetCPU)-$(TargetOS)\tgshd"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
Expand Down

0 comments on commit 03ba287

Please sign in to comment.