Create target directories before copying file#16739
Create target directories before copying file#16739asolntsev merged 1 commit intoSeleniumHQ:trunkfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
|
@diemol @asolntsev for your review kindly. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
Hi. As I said in the ticket, I think that the end user is responsible for creating Selenium could just throw an exception like "I cannot download the file because |
|
Decided to merge it because this argumentation was strong: #16738 (comment) :) |
User description
Fixes #16738
🔄 Types of changes
PR Type
Bug fix
Description
Ensure parent directories exist before file download
Prevents IOException when target directory missing
Diagram Walkthrough
File Walkthrough
RemoteWebDriver.java
Add directory creation before file downloadjava/src/org/openqa/selenium/remote/RemoteWebDriver.java
Files.createDirectories(targetLocation)call before file copyoperation
downloading files to non-existent paths