diff options
author | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 21:49:11 +0000 |
---|---|---|
committer | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-28 21:49:11 +0000 |
commit | 4afc8d67c4d6491fe1e1d60d17fa6651e861e795 (patch) | |
tree | 8a1f0c5d210528d9184b95d5a7d84355505d2621 | |
parent | 8ade07b605b2c1431595cc03d7489c69dff6cc0b (diff) | |
download | chromium_src-4afc8d67c4d6491fe1e1d60d17fa6651e861e795.zip chromium_src-4afc8d67c4d6491fe1e1d60d17fa6651e861e795.tar.gz chromium_src-4afc8d67c4d6491fe1e1d60d17fa6651e861e795.tar.bz2 |
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
-rwxr-xr-x | build/symlink.py | 2 |
1 files changed, 1 insertions, 1 deletions
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.') |