View Issue Details

IDProjectCategoryView StatusLast Update
0006739JEDI Code LibraryJclCompressionpublic2022-02-18 12:27
ReporterlucianoDaeAssigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
Product VersionVersion 2.5 (Subversion repository/Daily zips) 
Target VersionFixed in Version 
Summary0006739: Error compressing file in use.
DescriptionIt is not possible to compress any file that is used by another process I made a small modification in the unit "JclCompression"

I would like this modification to be changed in the project as well.


function OpenFileStream(const FileName: TFileName; StreamAccess: TJclStreamAccess): TStream;
begin
  Result := nil;
  case StreamAccess of
    saCreate:
      Result := TFileStream.Create(FileName, fmCreate);
    saReadOnly:
      if FileExists(FileName) then
        Result := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone); // Luciano changed to be able to compress file that is in use
    saReadOnlyDenyNone:
      if FileExists(FileName) then
        Result := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone);
    saWriteOnly:
      if FileExists(FileName) then
        Result := TFileStream.Create(FileName, fmOpenWrite)
      else
      if FileName <> '' then
        Result := TFileStream.Create(FileName, fmCreate);
    saReadWrite:
      if FileExists(FileName) then
        Result := TFileStream.Create(FileName, fmOpenReadWrite)
      else
      if FileName <> '' then
        Result := TFileStream.Create(FileName, fmCreate);
  end;
end;
TagsNo tags attached.
Fixed in GIT commit
Fixed in SVN revision
IDE versionAll

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-02-18 12:27 lucianoDae New Issue