Skip to content

Commit 03ba287

Browse files
committed
File manager fix
1 parent a7e2340 commit 03ba287

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

configuration.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function TConfig.GetBotTooken: String;
7575

7676
function TConfig.GetDefaultDir: String;
7777
begin
78-
Result:=FIni.ReadString('File', 'DefaultDir', GetCurrentDir);
78+
Result:=FIni.ReadString('File', 'DefaultDir', PathDelim);
7979
end;
8080

8181
function TConfig.GetHTTPProxyHost: String;

shellthread.pas

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,17 @@ procedure TShellThread.BotReceiveMessage(ASender: TObject;
126126
end;
127127

128128
procedure TShellThread.BotReceiveCallbackQuery(ASender: TObject; ACallback: TCallbackQueryObj);
129+
var
130+
aName: String;
129131
begin
130132
if not CommandStart then
131133
Exit;
132134
FIsCallBack:=True;
135+
aName:=RightStr(ACallback.Data, Length(ACallback.Data)-Length(dt_dir)-1);
133136
case ExtractWord(1, ACallback.Data, [' ']) of
134-
dt_script: CallbackScript(ExtractWord(2, ACallback.Data, [' ']));
135-
dt_dir: CallbackDir(ACallback.Message.Text, ExtractWord(2, ACallback.Data, [' ']));
136-
dt_file: CallbackFile(ACallback.Message.Text, ExtractWord(2, ACallback.Data, [' ']));
137+
dt_script: CallbackScript(aName);
138+
dt_dir: CallbackDir(ACallback.Message.Text, aName);
139+
dt_file: CallbackFile(ACallback.Message.Text, aName);
137140
end;
138141
end;
139142

tgshd.lpi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<Version Value="11"/>
6262
<PathDelim Value="\"/>
6363
<Target>
64-
<Filename Value="tgshd"/>
64+
<Filename Value="$(TargetCPU)-$(TargetOS)\tgshd"/>
6565
</Target>
6666
<SearchPaths>
6767
<IncludeFiles Value="$(ProjOutDir)"/>
@@ -89,7 +89,7 @@
8989
<Version Value="11"/>
9090
<PathDelim Value="\"/>
9191
<Target>
92-
<Filename Value="tgshd"/>
92+
<Filename Value="$(TargetCPU)-$(TargetOS)\tgshd"/>
9393
</Target>
9494
<SearchPaths>
9595
<IncludeFiles Value="$(ProjOutDir)"/>

0 commit comments

Comments
 (0)