mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-12-05 18:41:56 +00:00
fix:linux上路径问题
This commit is contained in:
parent
2bb0bcf5ea
commit
a1fb3d0cec
@ -103,12 +103,12 @@ export class FilesService {
|
|||||||
const localFilePath = path.normalize(localFilePathRaw);
|
const localFilePath = path.normalize(localFilePathRaw);
|
||||||
const localFilePathForCompare = localFilePath.replace(/\\/g, '/');
|
const localFilePathForCompare = localFilePath.replace(/\\/g, '/');
|
||||||
|
|
||||||
this.logger.debug(`replacPath: ${replacPath}`);
|
//this.logger.debug(`replacPath: ${replacPath}`);
|
||||||
this.logger.debug(`remoteBaseNorm: ${remoteBaseNorm}`);
|
//this.logger.debug(`remoteBaseNorm: ${remoteBaseNorm}`);
|
||||||
this.logger.debug(`rawRemotePath: ${rawRemotePath}`);
|
//this.logger.debug(`rawRemotePath: ${rawRemotePath}`);
|
||||||
this.logger.debug(`remoteRelativePath: ${remoteRelativePath}`);
|
//this.logger.debug(`remoteRelativePath: ${remoteRelativePath}`);
|
||||||
this.logger.debug(`localRelative: ${localRelative}`);
|
//this.logger.debug(`localRelative: ${localRelative}`);
|
||||||
this.logger.debug(`localFilePath: ${localFilePathForCompare}`);
|
//this.logger.debug(`localFilePath: ${localFilePathForCompare}`);
|
||||||
|
|
||||||
if (remoteFile.is_dir) {
|
if (remoteFile.is_dir) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { FilesService } from '../../core/files/files.service';
|
|||||||
export class CdnService {
|
export class CdnService {
|
||||||
private readonly logger = new Logger(CdnService.name);
|
private readonly logger = new Logger(CdnService.name);
|
||||||
private filePath: string;
|
private filePath: string;
|
||||||
private readonly updateMs = 2 * 60 * 100; // 15min
|
private readonly updateMs = 10 * 60 * 1000; // 10min
|
||||||
@Inject(PathService)
|
@Inject(PathService)
|
||||||
private readonly paths: PathService;
|
private readonly paths: PathService;
|
||||||
constructor(
|
constructor(
|
||||||
@ -40,7 +40,7 @@ export class CdnService {
|
|||||||
let remoteFileList = remoteFiles.data.content;
|
let remoteFileList = remoteFiles.data.content;
|
||||||
const localFiles =
|
const localFiles =
|
||||||
await this.filesService.getLocalFileList(cdnPath);
|
await this.filesService.getLocalFileList(cdnPath);
|
||||||
this.logger.debug(`localFlies: ${JSON.stringify(localFiles)}`);
|
//this.logger.debug(`localFlies: ${JSON.stringify(localFiles)}`);
|
||||||
await this.filesService.compareAndDownloadFiles(
|
await this.filesService.compareAndDownloadFiles(
|
||||||
cdnPath,
|
cdnPath,
|
||||||
localFiles,
|
localFiles,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user