From 4afc8d67c4d6491fe1e1d60d17fa6651e861e795 Mon Sep 17 00:00:00 2001 From: "mostynb@opera.com" Date: Tue, 28 May 2013 21:49:11 +0000 Subject: Skip argv[0] when processing command line options in symlink.py The problem fixed by this patch is that this script always creates a link to itself in the target location. That behavior was probably not intended and caused problems when running this script several times with the same target folder. Each run of this script would create one expected link and one link to the script itself. Meaning that the need to use --force the second time was needed to overwrite the "self-link" from the first run. Even with --force there were issues if this script was run in parallel since there can be a race condition in overwriting the "self-link". Review URL: https://chromiumcodereview.appspot.com/16096006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202661 0039d316-1c4b-4281-b951-d872f2087c98 --- build/symlink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/symlink.py') diff --git a/build/symlink.py b/build/symlink.py index e525731..aade2f8 100755 --- a/build/symlink.py +++ b/build/symlink.py @@ -17,7 +17,7 @@ def Main(argv): parser.add_option('-f', '--force', action='store_true') parser.add_option('--touch') - options, args = parser.parse_args(argv) + options, args = parser.parse_args(argv[1:]) if len(args) < 2: parser.error('at least two arguments required.') -- cgit v1.1