diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-05 14:35:28 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-05 14:35:28 +0000 |
commit | 2403ce38499ea6a6206046ad500ad54d209cabfa (patch) | |
tree | 21ac717a2ecd30b256e76065d4c2e47e120e4606 /tools | |
parent | 4541b721276129b105aad58badf45b4a6b800984 (diff) | |
download | chromium_src-2403ce38499ea6a6206046ad500ad54d209cabfa.zip chromium_src-2403ce38499ea6a6206046ad500ad54d209cabfa.tar.gz chromium_src-2403ce38499ea6a6206046ad500ad54d209cabfa.tar.bz2 |
Fix symlinked file handling.
Do not path join "rest" to the destination file when rest == '', which happens
when a file inside a symlinked directory is added. Otherwise an '/' is added
when it shouldn't.
TBR=cmp@chromium.org
NOTRY=true
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10701102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/isolate/isolate.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/isolate/isolate.py b/tools/isolate/isolate.py index ad5da95..bccf531 100755 --- a/tools/isolate/isolate.py +++ b/tools/isolate/isolate.py @@ -80,9 +80,9 @@ def expand_directory_and_symlink(indir, relfile, blacklist): symlink_path = os.path.join(indir, symlink_relfile) pointed = os.readlink(symlink_path) dest_infile = normpath( - trace_inputs.safe_join( - os.path.join(os.path.dirname(symlink_path), pointed), - rest)) + os.path.join(os.path.dirname(symlink_path), pointed)) + if rest: + dest_infile = trace_inputs.safe_join(dest_infile, rest) if not dest_infile.startswith(indir): raise run_test_from_archive.MappingError( 'Can\'t map symlink reference %s (from %s) ->%s outside of %s' % |