Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed an issue with launching programs from the Address Bar #15459

Merged
merged 4 commits into from
May 24, 2024

Conversation

FieryRMS
Copy link
Contributor

Resolved / Related Issues

Steps used to test these changes

  1. Create test1.bat and test 1.bat both with the same contents as below and place it in C:\Folder,
    @echo off
    echo %*
  2. Run each line from below through the address bar,
    // should fail
    C:\Folder\test 1
    C:\Folder\test 1 param1
    C:\Folder\test 1"
    "C:\Folder\test 1 param1
    "C:\Folder\test 1 param1"
    
    // should pass
    C:\Folder\test 1.bat
    "C:\Folder\test 1"
    "C:\Folder\test 1" param1
    "C:\Folder\test 1" param1 param2 "param 3"
    "C:\Folder\test 1
    C:\Folder\test1
    C:\Folder\test1 param1
    C:\Folder\test1 param1 param2 "param 3"
    "C:\Folder\test 1.bat"     param1           param2
    

Undefined behavior
The below work as well, although it's not clear how exactly these should be handled.

C:\Folder\test1""
"C:\Folder\test1"""" param1 param2
"C:\Folder\test 1""""" param1 param2 "param 3"

@yaira2 yaira2 changed the title Fix: Use quotes to get fileName in LaunchApplicationFromPath Fix: Fixed an issue with launching programs from the Address Bar May 23, 2024
@hishitetsu
Copy link
Member

@FieryRMS
Copy link
Contributor Author

@hishitetsu that definitely simplified things a bit, it should be working now.

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use CreateProcess in Win32API in the future to avoid this thing!

But, code wise, LGTM.

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels May 24, 2024
@yaira2 yaira2 merged commit ee185c6 into files-community:main May 24, 2024
6 checks passed
@FieryRMS FieryRMS deleted the fix15455_LaunchWithQuotes branch May 25, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Address bar does not launch programs when path contains spaces and has parameters
4 participants