Trailing slash on STATIC_ROOT and template DIRS breaks on Windows #2425

Closed
opened 2025-12-29 17:26:00 +01:00 by adam · 1 comment
Owner

Originally created by @axnsan12 on GitHub (Mar 4, 2019).

Environment

  • Python version: 3.7.1
  • NetBox version: 2.5.8-dev

Steps to Reproduce

  1. Run manage.py collectstatic on Windows
  2. Weep

Expected Behavior

Working app.

Observed Behavior

Paths with trailing slashes do not work on windows, they cause errors such as django.core.exceptions.SuspiciousFileOperation: The joined path (C:\Projects\netbox\netbox\static\clipboard-2.0.4.min.js) is located outside of the base path component (C:\Projects\netbox\netbox\static\).

Originally created by @axnsan12 on GitHub (Mar 4, 2019). ### Environment * Python version: 3.7.1 * NetBox version: 2.5.8-dev ### Steps to Reproduce 1. Run `manage.py collectstatic` on Windows 2. Weep ### Expected Behavior Working app. ### Observed Behavior Paths with trailing slashes do not work on windows, they cause errors such as `django.core.exceptions.SuspiciousFileOperation: The joined path (C:\Projects\netbox\netbox\static\clipboard-2.0.4.min.js) is located outside of the base path component (C:\Projects\netbox\netbox\static\)`.
adam added the type: bugstatus: accepted labels 2025-12-29 17:26:00 +01:00
adam closed this issue 2025-12-29 17:26:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 4, 2019):

Fixed by #2955

@jeremystretch commented on GitHub (Mar 4, 2019): Fixed by #2955
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2425