diff --git a/src/app/components/IECPage.tsx b/src/app/components/IECPage.tsx
index 82bd993..69008b3 100644
--- a/src/app/components/IECPage.tsx
+++ b/src/app/components/IECPage.tsx
@@ -169,7 +169,7 @@ export default function IECPage({ config, setConfig }: IECPageProps) {
/>
)}
-
Directory Settings
+
Directory Enhancements
{Object.entries(iec.directory || {}).map(([key, value]) => (
diff --git a/src/app/settings.ts b/src/app/settings.ts
index 3d77a06..7e7bce7 100644
--- a/src/app/settings.ts
+++ b/src/app/settings.ts
@@ -40,12 +40,20 @@ const SAVED_INDICATOR_MS = 1500;
export type SettingsConfig = Record;
+/** Try primary path first, fall back to secondary. Returns null if both fail. */
+async function getTextWithFallback(primary: string, fallback: string): Promise {
+ try { return await getFileContents(primary).then(b => b.text()); } catch { /* try fallback */ }
+ try { return await getFileContents(fallback).then(b => b.text()); } catch { /* both failed */ }
+ return null;
+}
+
/** Read both config files from the WebDAV server and merge them. Returns null on failure. */
export async function readSettings(): Promise {
try {
+ // Mirror firmware priority: /sd/.sys/ first, fall back to /.sys/
const [configText, devicesText] = await Promise.all([
- getFileContents(SETTINGS_PATH).then(b => b.text()),
- getFileContents(DEVICES_PATH).then(b => b.text()).catch(() => null),
+ getTextWithFallback('/sd' + SETTINGS_PATH, SETTINGS_PATH),
+ getTextWithFallback('/sd' + DEVICES_PATH, DEVICES_PATH),
]);
if (!configText) return null;
const config = JSON.parse(configText);
diff --git a/src/imports/config.json b/src/imports/config.json
index c44b31c..a0bba45 100644
--- a/src/imports/config.json
+++ b/src/imports/config.json
@@ -91,8 +91,8 @@
},
"directory": {
"force_0801": 1,
- "nfo_header": 1,
"bam_message": 1,
+ "nfo_header": 1,
"hidden_files": 1,
"hidden_dirs": 1,
"date_time": 1,