gn: SourceDirForCurrentDirectory returns absolute on empty source_root
commit865b9bbb7f6111b5205a599201c6270e95cab9f7
authorscottmg <scottmg@chromium.org>
Tue, 2 Dec 2014 10:48:29 +0000 (2 02:48 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 2 Dec 2014 10:49:18 +0000 (2 10:49 +0000)
tree71e628a067c39fdab0f6582c90bbcfe07c06fdef
parent48847895beb5eb7da6e25d0d21e72a57a6d6d0a7
gn: SourceDirForCurrentDirectory returns absolute on empty source_root

This fixes `gn format relative/path/BUILD.gn` on non-Windows.

R=brettw@chromium.org
BUG=348474

Review URL: https://codereview.chromium.org/775543002

Cr-Commit-Position: refs/heads/master@{#306368}
tools/gn/command_format.cc
tools/gn/filesystem_utils.cc
tools/gn/filesystem_utils.h
tools/gn/filesystem_utils_unittest.cc