Brandonv101 / chrome-download-assistant

Automatically exported from code.google.com/p/chrome-download-assistant
0 stars 0 forks source link

Add new downloader discards all options but the binary's location (first argument) #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a new downloader like "wget -mc --referer=$REFERER ... $URL"
2.Try downloading something
3."wget $URL" is called instead

What is the expected output? What do you see instead?
The expected output is to use the whole string, not only the first word as the 
binary to call and to ignore the rest

What version of the product are you using? On what operating system?
4.0.7 on Linux

Please provide any additional information below.
I'm not 100% sure, but I think this has to do with the split function below 
that fills customArr in downloader.js. The rest of the arguments are in 
customArr[3] upwards and are silently discarded.

      var customArr = localStorage[name].split(',');
      downloaderManager.menuItems.push({
        storageName: name, name: customArr[1], showName: 'menu_custom',
        isLinux: true, command: customArr[2], isUserAdded: true,
        supportDownloadAll: false, image: customArr[0]});
      downloaderManager.downloader[customArr[1]] =
          new LinuxDownloader(plugin, customArr[2]);

Original issue reported on code.google.com by Axel.Th...@ATrpms.net on 14 May 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Function LinuxDownloader in download.js does save the argument in 
"this.command" and pass the execute-file-path to the plugin via 
Downloader.prototype.updateNPObjectIfNeeded.

However, it doesn't pass the whole arguments (in LinuxDownloader.command) to 
DownloaderScriptObject (see 
http://code.google.com/p/chrome-download-assistant/source/browse/trunk/release-4
.0.7/plugin/downloader_script_object.cc). It should be initialized in 
DownloaderScriptObject::Init.

It's definitely bug. The author should fix it

Original comment by j...@google.com on 16 May 2011 at 10:32

GoogleCodeExporter commented 9 years ago

Original comment by zhang_ji...@vanceinfo.com on 17 May 2011 at 1:54

GoogleCodeExporter commented 9 years ago
Issue 15 has been merged into this issue.

Original comment by jingz...@google.com on 23 May 2011 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by jingz...@google.com on 20 Jun 2011 at 8:56