diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 72bc6c8f4d..5235ae4d9e 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
@@ -12,6 +12,7 @@ BitBake build tools. | |||
12 | # | 12 | # |
13 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig | 13 | # Based on functions from the base bb module, Copyright 2003 Holger Schurig |
14 | 14 | ||
15 | import shlex | ||
15 | import re | 16 | import re |
16 | import tempfile | 17 | import tempfile |
17 | import os | 18 | import os |
@@ -91,9 +92,9 @@ class Wget(FetchMethod): | |||
91 | fetchcmd = self.basecmd | 92 | fetchcmd = self.basecmd |
92 | 93 | ||
93 | if 'downloadfilename' in ud.parm: | 94 | if 'downloadfilename' in ud.parm: |
94 | dldir = d.getVar("DL_DIR") | 95 | localpath = os.path.join(d.getVar("DL_DIR"), ud.localfile) |
95 | bb.utils.mkdirhier(os.path.dirname(dldir + os.sep + ud.localfile)) | 96 | bb.utils.mkdirhier(os.path.dirname(localpath)) |
96 | fetchcmd += " -O " + dldir + os.sep + ud.localfile | 97 | fetchcmd += " -O %s" % shlex.quote(localpath) |
97 | 98 | ||
98 | if ud.user and ud.pswd: | 99 | if ud.user and ud.pswd: |
99 | fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd) | 100 | fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd) |