Scope changed-files tree PR to relevant files

- revert unrelated server-side attachment/image changes from this branch\n- keep changed-files tree UX fixes (icons, directory behavior, whitespace-safe paths, stat visibility)\n\nCo-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-03-05 15:56:40 -08:00
1 parent 5c03804bac
commit 6841fa17d4
14 files changed
+38 -69

No files matched your search

+4 -4
View File
@@ -60,9 +60,9 @@ import { ServerConfig } from "./config";
import { GitCore } from "./git/Services/GitCore.ts";
import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute";
import {
ATTACHMENTS_ROUTE_PREFIX,
normalizeAttachmentRelativePath,
resolveAttachmentRelativePath,
stripAttachmentRoutePrefix,
} from "./attachmentPaths";
import {
createAttachmentId,
@@ -350,9 +350,9 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return<
return;
}
const routeRelativePath = stripAttachmentRoutePrefix(url.pathname);
if (routeRelativePath !== null) {
const normalizedRelativePath = normalizeAttachmentRelativePath(routeRelativePath);
if (url.pathname.startsWith(ATTACHMENTS_ROUTE_PREFIX)) {
const rawRelativePath = url.pathname.slice(ATTACHMENTS_ROUTE_PREFIX.length);
const normalizedRelativePath = normalizeAttachmentRelativePath(rawRelativePath);
if (!normalizedRelativePath) {
respond(400, { "Content-Type": "text/plain" }, "Invalid attachment path");
return;