Homec4science

Validate paths before saving them when editing an owners package

Authored by Nick Harper <nharper@fb.com> on Dec 21 2011, 01:23.

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

Committed
Nick Harper <nharper@fb.com>Dec 21 2011, 02:31
Pushed
aubortJan 31 2017, 17:16
Parents
rPH43430e154d3e: Rough cut of Project profile improvements
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Harper <nharper@fb.com> committed rPH7075222b4b33: Validate paths before saving them when editing an owners package (authored by Nick Harper <nharper@fb.com>).Dec 21 2011, 02:31