]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Filename linter fix for Windows
authorAurelijus <aurelijus@astdev.lt>
Thu, 24 May 2012 08:13:20 +0000 (10:13 +0200)
committerAurelijus <aurelijus@astdev.lt>
Thu, 24 May 2012 08:28:11 +0000 (10:28 +0200)
Summary: On windows paths are separated with \.

Test Plan: - Run filename linter on windows (or some path with \)

Reviewers: epriestley

CC: aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2559

src/lint/linter/filename/ArcanistFilenameLinter.php

index a529bd74b86163aa53b03b04b86d782e6f43c5e6..e1c2d2bb7139223cb92f6d346d6b5bac092bf25b 100644 (file)
@@ -44,7 +44,7 @@ final class ArcanistFilenameLinter extends ArcanistLinter {
   }
 
   public function lintPath($path) {
-    if (!preg_match('@^[a-z0-9./_-]+$@i', $path)) {
+    if (!preg_match('@^[a-z0-9./\\\\_-]+$@i', $path)) {
       $this->raiseLintAtPath(
         self::LINT_BAD_FILENAME,
         'Name files using only letters, numbers, period, hyphen and '.