fix(core): update
This commit is contained in:
parent
120fd0b321
commit
64431703b5
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartarchive',
|
name: '@push.rocks/smartarchive',
|
||||||
version: '4.0.34',
|
version: '4.0.35',
|
||||||
description: 'A library for working with archive files, providing utilities for compressing and decompressing data.'
|
description: 'A library for working with archive files, providing utilities for compressing and decompressing data.'
|
||||||
}
|
}
|
||||||
|
@ -21,12 +21,17 @@ export class TarTools {
|
|||||||
}
|
}
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
return new Promise<void>(async (resolve, reject) => {
|
return new Promise<void>(async (resolve, reject) => {
|
||||||
let fileName =
|
let fileName: string | null = null;
|
||||||
optionsArg.fileName || optionsArg.content instanceof plugins.smartfile.SmartFile
|
|
||||||
? (optionsArg.content as plugins.smartfile.SmartFile).relative
|
if (optionsArg.fileName) {
|
||||||
: null || optionsArg.content instanceof plugins.smartfile.StreamFile
|
fileName = optionsArg.fileName;
|
||||||
? (optionsArg.content as plugins.smartfile.StreamFile).relativeFilePath
|
} else if (optionsArg.content instanceof plugins.smartfile.SmartFile) {
|
||||||
: null || optionsArg.filePath;
|
fileName = (optionsArg.content as plugins.smartfile.SmartFile).relative;
|
||||||
|
} else if (optionsArg.content instanceof plugins.smartfile.StreamFile) {
|
||||||
|
fileName = (optionsArg.content as plugins.smartfile.StreamFile).relativeFilePath;
|
||||||
|
} else if (optionsArg.filePath) {
|
||||||
|
fileName = optionsArg.filePath;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* contentByteLength is used to set the size of the entry in the tar file
|
* contentByteLength is used to set the size of the entry in the tar file
|
||||||
|
Loading…
Reference in New Issue
Block a user