mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 13:58:33 +02:00
* Disable parts of commit 13378 for windows, since it blocks extracting zips with Unix lineseparators (like Open Office files, even when generated on Windows)
* Minor tweak to demo git-svn-id: trunk@15025 -
This commit is contained in:
parent
49fc4795e3
commit
0f9f3600c5
@ -20,7 +20,7 @@ begin
|
||||
FileName:=paramstr(1);
|
||||
if not fileexists(FileName) then
|
||||
Usage;
|
||||
edir:=extractfilename(filename)+'extractiondir';
|
||||
edir:=extractfilename(filename)+'.extractiondir';
|
||||
mkdir(edir);
|
||||
unzipper:=TUnzipper.create;
|
||||
unzipper.FileName:=FileName;
|
||||
|
@ -1561,9 +1561,15 @@ Begin
|
||||
for Windows compatibility: it allows both '/' and '\'
|
||||
as directory separator. We don't want that behaviour
|
||||
here, since 'abc\' is a valid file name under Unix.
|
||||
|
||||
(mantis 15836) On the other hand, many archives on
|
||||
windows have '/' as pathseparator, even Windows
|
||||
generated .odt files. So we disable this for windows.
|
||||
}
|
||||
OldDirectorySeparators:=AllowDirectorySeparators;
|
||||
{$ifndef Windows}
|
||||
AllowDirectorySeparators:=[DirectorySeparator];
|
||||
{$endif}
|
||||
Path:=ExtractFilePath(OutFileName);
|
||||
OutStream:=Nil;
|
||||
If Assigned(FOnCreateStream) then
|
||||
@ -1576,10 +1582,12 @@ Begin
|
||||
AllowDirectorySeparators:=OldDirectorySeparators;
|
||||
OutStream:=TFileStream.Create(OutFileName,fmCreate);
|
||||
end;
|
||||
|
||||
|
||||
AllowDirectorySeparators:=OldDirectorySeparators;
|
||||
Result:=True;
|
||||
If Assigned(FOnStartFile) then
|
||||
FOnStartFile(Self,OutFileName);
|
||||
|
||||
End;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user