History

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 <codex@users.noreply.github.com>

Julius Marminge committed 8 months ago

Commit 6841fa11 parent 5c0380414 files · +38 −69Browse files

Showing the changes to apps/server/src/wsServer.ts (1 of 14 files). Show all

Unified · Split

apps/server/src/wsServer.ts+4−4
@@ -60,9 +60,9 @@ import { ServerConfig } from "./config"; · 59 unmodified lines
60import { GitCore } from "./git/Services/GitCore.ts";60import { GitCore } from "./git/Services/GitCore.ts";
61import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute";61import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute";
62import {62import {
63 ATTACHMENTS_ROUTE_PREFIX,
63 normalizeAttachmentRelativePath,64 normalizeAttachmentRelativePath,
64 resolveAttachmentRelativePath,65 resolveAttachmentRelativePath,
65 stripAttachmentRoutePrefix,
66} from "./attachmentPaths";66} from "./attachmentPaths";
67import {67import {
68 createAttachmentId,68 createAttachmentId,
@@ -350,9 +350,9 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return< · 281 unmodified lines
350 return;350 return;
351 }351 }
352 352
353 const routeRelativePath = stripAttachmentRoutePrefix(url.pathname);353 if (url.pathname.startsWith(ATTACHMENTS_ROUTE_PREFIX)) {
354 if (routeRelativePath !== null) {354 const rawRelativePath = url.pathname.slice(ATTACHMENTS_ROUTE_PREFIX.length);
355 const normalizedRelativePath = normalizeAttachmentRelativePath(routeRelativePath);355 const normalizedRelativePath = normalizeAttachmentRelativePath(rawRelativePath);
356 if (!normalizedRelativePath) {356 if (!normalizedRelativePath) {
357 respond(400, { "Content-Type": "text/plain" }, "Invalid attachment path");357 respond(400, { "Content-Type": "text/plain" }, "Invalid attachment path");
358 return;358 return;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t