Sonar fix

This commit is contained in:
Wkeynhk
2025-12-27 03:17:42 +03:00
parent 240a75c1d0
commit aff9e13bca

View File

@@ -50,7 +50,7 @@ export class DownloadManager {
const pathParts = pathname.split('/');
const filename = pathParts[pathParts.length - 1];
if (filename && filename.includes('.') && filename.length > 0) {
if (filename?.includes('.') && filename.length > 0) {
return decodeURIComponent(filename);
}
} catch {
@@ -61,7 +61,7 @@ export class DownloadManager {
}
private static sanitizeFilename(filename: string): string {
return filename.replace(/[<>:"/\\|?*]/g, '_');
return filename.replaceAll(/[<>:"/\\|?*]/g, '_');
}
private static createDownloadPayload(directUrl: string, originalUrl: string, downloadId: string, savePath: string) {