mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Archive interface] Indicate that archive features can change with an opened archive.
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Aaru.CommonTypes.Enums;
|
using Aaru.CommonTypes.Enums;
|
||||||
using Aaru.CommonTypes.Interfaces;
|
using Aaru.CommonTypes.Interfaces;
|
||||||
@@ -160,6 +161,12 @@ public sealed partial class Symbian
|
|||||||
|
|
||||||
_files = filesWithFixedFilenames;
|
_files = filesWithFixedFilenames;
|
||||||
|
|
||||||
|
_features = ArchiveSupportedFeature.SupportsFilenames | ArchiveSupportedFeature.SupportsSubdirectories;
|
||||||
|
if(_release6 && !sh.options.HasFlag(SymbianOptions.NoCompress))
|
||||||
|
_features |= ArchiveSupportedFeature.SupportsCompression;
|
||||||
|
if(_files.Any(t => t.mime is not null))
|
||||||
|
_features |= ArchiveSupportedFeature.SupportsXAttrs;
|
||||||
|
|
||||||
return ErrorNumber.NoError;
|
return ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public sealed partial class Symbian : IArchive
|
|||||||
{
|
{
|
||||||
const string MODULE_NAME = "Symbian Installation File Plugin";
|
const string MODULE_NAME = "Symbian Installation File Plugin";
|
||||||
Encoding _encoding;
|
Encoding _encoding;
|
||||||
|
ArchiveSupportedFeature _features;
|
||||||
List<DecodedFileRecord> _files;
|
List<DecodedFileRecord> _files;
|
||||||
bool _opened;
|
bool _opened;
|
||||||
bool _release6;
|
bool _release6;
|
||||||
@@ -56,9 +57,13 @@ public sealed partial class Symbian : IArchive
|
|||||||
public Guid Id => new("0EC84EC7-EAE6-4196-83FE-943B3FE48DBD");
|
public Guid Id => new("0EC84EC7-EAE6-4196-83FE-943B3FE48DBD");
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ArchiveSupportedFeature GetArchiveFeatures() => ArchiveSupportedFeature.SupportsFilenames |
|
public ArchiveSupportedFeature GetArchiveFeatures() =>
|
||||||
|
!_opened
|
||||||
|
? ArchiveSupportedFeature.SupportsFilenames |
|
||||||
ArchiveSupportedFeature.SupportsCompression |
|
ArchiveSupportedFeature.SupportsCompression |
|
||||||
ArchiveSupportedFeature.SupportsSubdirectories;
|
ArchiveSupportedFeature.SupportsSubdirectories |
|
||||||
|
ArchiveSupportedFeature.SupportsXAttrs
|
||||||
|
: _features;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
Submodule Aaru.CommonTypes updated: c53c27fb94...78ec120a8d
Reference in New Issue
Block a user