bugGNU Wget - Bugs: bug #63674, Can't get -P and -O flags working...


bug #63674: Can't get -P and -O flags working together for wget command

Submitter:  None
Submitted:  Tue 17 Jan 2023 02:05:26 AM UTC
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Sanjeev Penupala Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  trunk
Operating System:  Others (Please Specify) Reproducibility:  Every Time
Fixed Release:  None Planned Release:  None
Regression:  None Work Required:  None
Patch Included:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 17 Jan 2023 02:05:26 AM UTC, original submission:  

Bug Report for wget (1/15/23, 9:21 PM CST)

System Information

  • `wget` version: 1.21.2
  • OS: Ubuntu 22.04.1 LTS (WSL 2)

Directory Structure:
├─ test/

The Issue

I have encountered a specific issue with the `-P` and `-O` flags, where the `-P` flag argument is completely ignored when used with the `-O` flag. For example, I have the following `wget` command:

> wget -P test/ -O test.doc https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc

Expected Outcome:
├─ test/
│  ├─ test.doc

Actual Outcome:
├─ test/

However, if I remove the `-O` flag from the command, I get the expected outcome, but of course, it won't be renamed.

> wget -P test/ https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc

├─ test/
│  ├─ file-sample_100kB.doc


It seems like there is clearly something happening between the `-P` and `-O` flags, where I can't use both of them simultaneously for some reason.

I have also tried absolute paths, and that has not worked for me either.

> `wget -P home/test/ https://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc`



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


No changes have been made to this item

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code