mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0000912] Drag and drop the url from Chrome browser does not create the .url file
This commit is contained in:
parent
cbf16428f5
commit
a0b3b5890b
1 changed files with 9 additions and 8 deletions
|
|
@ -198,7 +198,7 @@ uses
|
|||
|
||||
//DC
|
||||
uOSUtils, fOptionsDragDrop, uShowMsg, UGlobs, DCStrUtils, DCOSUtils,
|
||||
uClipboard, uLng, uDebug, DCClassesUtf8;
|
||||
uClipboard, uLng, uDebug;
|
||||
|
||||
var
|
||||
// Supported formats by the source.
|
||||
|
|
@ -996,13 +996,14 @@ var
|
|||
Medium : TSTGMedium;
|
||||
Ifile, iStg : IStorage;
|
||||
tIID : PGuid;
|
||||
hFile: THandle;
|
||||
pvStrm: IStream;
|
||||
i64Size: Int64;
|
||||
i64Move: Int64;
|
||||
dwSize: LongInt;
|
||||
AnyPointer: PAnsiChar;
|
||||
msStream: TMemoryStream;
|
||||
InnerFilename:WideString;
|
||||
InnerFilename: WideString;
|
||||
begin
|
||||
result:=FALSE;
|
||||
InnerFilename:= UTF8Decode(ExtractFilepath(WantedFilename)) + TEMPFILENAME;
|
||||
|
|
@ -1028,16 +1029,16 @@ begin
|
|||
begin
|
||||
AnyPointer := GlobalLock(Medium.HGLOBAL);
|
||||
try
|
||||
with TStringListEx.Create do
|
||||
try
|
||||
Text := StrPas(AnyPointer);
|
||||
SaveToFile(UTF8Encode(InnerFilename));
|
||||
finally
|
||||
Free;
|
||||
hFile := mbFileCreate(UTF8Encode(InnerFilename));
|
||||
if hFile <> feInvalidHandle then
|
||||
begin
|
||||
FileWrite(hFile, AnyPointer^, GlobalSize(Medium.HGLOBAL));
|
||||
FileClose(hFile);
|
||||
end;
|
||||
finally
|
||||
GlobalUnlock(Medium.HGLOBAL);
|
||||
end;
|
||||
if Medium.PUnkForRelease = nil then GlobalFree(Medium.HGLOBAL);
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue