fs robustness patch #1

Merged
eternal-flame-AD merged 4 commits from fs-patch into main 2024-07-24 19:05:28 +00:00
4 changed files with 0 additions and 4 deletions
Showing only changes of commit b2f3bb9602 - Show all commits

View File

@ -1,4 +1,3 @@
import path from 'path';
import { describe, it, expect } from 'vitest';
import formatDuration from '$lib/formatDuration';
import { safePath } from '$lib/server/safePath';

View File

@ -1,5 +1,4 @@
import fs from 'fs';
import path from 'path';
import { globalMemoryStorage, songData, songNameCache } from '$lib/server/cache.js';
import { getDirectoryHash } from '../dirHash';
import { safePath } from '../safePath';

View File

@ -2,7 +2,6 @@ import { safePath } from '$lib/server/safePath';
import { getCurrentFormattedDateTime } from '$lib/songUpdateTime';
import { json, error } from '@sveltejs/kit';
import fs from 'fs';
import path from 'path';
export async function GET({ params }) {
const filePath = safePath(`${params.id}.json`, { base: './data/song' });

View File

@ -1,7 +1,6 @@
/** @type {import('./$types').PageLoad} */
import { safePath } from '$lib/server/safePath';
import fs from 'fs';
import path from 'path';
export function load({ params }) {