mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
Add docker-compose config and normalize file path separators
Introduces a docker-compose.yml for containerized deployment of the application, including volume mappings and environment variable documentation. Updates files-hash utility to normalize path separators to forward slashes, ensuring cross-platform consistency when extracting basenames.
This commit is contained in:
@@ -44,7 +44,11 @@ export function generateFilesHash(filePaths: string[]): string {
|
||||
|
||||
// Extract basenames and filter to audio files only
|
||||
const audioBasenames = filePaths
|
||||
.map((filePath) => path.basename(filePath))
|
||||
.map((filePath) => {
|
||||
// Normalize path separators to forward slashes for cross-platform consistency
|
||||
const normalizedPath = filePath.replace(/\\/g, '/');
|
||||
return path.posix.basename(normalizedPath);
|
||||
})
|
||||
.filter((basename) => {
|
||||
const ext = path.extname(basename).toLowerCase();
|
||||
return AUDIO_EXTENSIONS.includes(ext);
|
||||
|
||||
Reference in New Issue
Block a user