HomePhorge

Validate paths before saving them when editing an owners package

Description

Validate paths before saving them when editing an owners package

Summary:
Paths in owners packages when referring to a directory should always end with
a trailing slash. (Otherwise, some things break, like loading the owning
packages for a path.) With this change, PhabricatorOwnersPackage now requires
that the path provided for a package is valid, and if the path is for a
directory, it adds a trailing slash if one was not provided.

Test Plan:
Edited a path in a package and left off the trailing slash. Saw that the slash
was added. Tried again with the trailing slash, and checked that another slash
was not added. Did this with a path in both a git and svn repository.

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1251

Details

Provenance
Nick HarperAuthored on Dec 20 2011, 4:23 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP43430e154d3e: Rough cut of Project profile improvements
Branches
Unknown
Tags
Unknown

Event Timeline