From 19b255d730fe2050254b277c4c0f4c8c42b8a03d Mon Sep 17 00:00:00 2001 From: Daniel Hammer Date: Thu, 28 May 2026 20:41:16 +0200 Subject: [PATCH] fix: delete redundant 0:/common directory, remove dead 0:/home fallback in Music and Video apps --- programs/GNUmakefile | 10 +--------- programs/src/music/main.cpp | 2 +- programs/src/video/main.cpp | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/programs/GNUmakefile b/programs/GNUmakefile index 2385380..63ab3b4 100644 --- a/programs/GNUmakefile +++ b/programs/GNUmakefile @@ -83,12 +83,9 @@ CONFIGDIR := data/config CONFIGSRC := $(wildcard $(CONFIGDIR)/*.toml) CONFIGDST := $(patsubst $(CONFIGDIR)/%,$(BINDIR)/config/%,$(CONFIGSRC)) -# Common shared assets (wallpapers, etc.) -COMMONKEEP := $(BINDIR)/common/.keep - .PHONY: all clean 2048 doom fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr calculator login desktop shell rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs icons fonts configs bearssl libc tls libjpeg libjpegwrite install-apps libloader libs libhello test_dialogs test_dl crashpad -all: bearssl libc libjpeg libjpegwrite tls libloader libs libhello $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr calculator 2048 doom rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell icons fonts install-apps test_dialogs test_dl crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) $(COMMONKEEP) +all: bearssl libc libjpeg libjpegwrite tls libloader libs libhello $(TARGETS) fetch wiki wikipedia weather imageviewer fontpreview spreadsheet wordprocessor pdfviewer disks devexplorer installer audio music video bluetooth network terminal klog procmgr calculator 2048 doom rpgdemo paint tcc lua screenshot texteditor mandelbrot printers timezone printd printctl dialogs login desktop shell icons fonts install-apps test_dialogs test_dl crashpad $(MANDST) $(WWWDST) $(CA_CERTS) $(CONFIGDST) # Build BearSSL static library (cross-compiled for freestanding x86_64). BEARSSL_INCLUDES := -isystem $(shell cd .. && pwd)/kernel/freestnd-c-hdrs/x86_64/include -isystem $(abspath include/libc) @@ -336,11 +333,6 @@ $(BINDIR)/config/%: $(CONFIGDIR)/% mkdir -p $(BINDIR)/config cp $< $@ -# Ensure common assets directory exists. -$(COMMONKEEP): - mkdir -p $(BINDIR)/common - touch $@ - # Build each system program from its source files. $(BINDIR)/os/%.elf: src/%/main.cpp link.ld GNUmakefile mkdir -p $(BINDIR)/os obj/$* diff --git a/programs/src/music/main.cpp b/programs/src/music/main.cpp index 7014bfd..4cf662f 100644 --- a/programs/src/music/main.cpp +++ b/programs/src/music/main.cpp @@ -1516,7 +1516,7 @@ extern "C" void _start() { if (montauk::getuser(username, sizeof(username)) > 0 && username[0]) { snprintf(g.dir_path, sizeof(g.dir_path), "0:/users/%s/Music", username); } else { - memcpy(g.dir_path, "0:/home", 8); + snprintf(g.dir_path, sizeof(g.dir_path), "0:/users"); } }; diff --git a/programs/src/video/main.cpp b/programs/src/video/main.cpp index 3785d94..df3f87f 100644 --- a/programs/src/video/main.cpp +++ b/programs/src/video/main.cpp @@ -1260,7 +1260,7 @@ static void set_default_dir() { snprintf(g.dir_path, sizeof(g.dir_path), "0:/users/%s", username); } } else { - montauk::strncpy(g.dir_path, "0:/home", (int)sizeof(g.dir_path)); + montauk::strncpy(g.dir_path, "0:/users", (int)sizeof(g.dir_path)); } }