Giter VIP home page Giter VIP logo

Comments (7)

emoacht avatar emoacht commented on September 24, 2024

Thanks for reporting.
But I could not reproduce. Could you elaborate exactly how you have tested it?

from hashpad.

DocBrown101 avatar DocBrown101 commented on September 24, 2024

To be able to debug it in Visusal Studio, you can create the launchSettings json and put a file there with spaces.
image

Then you only have to set a breakpoint in the MainWindow.xaml file in line 121.
image

The path to the file was split into three parts and therefore the file is no longer found.

from hashpad.

emoacht avatar emoacht commented on September 24, 2024

I think this issue is about the case where SendTo action triggers the OS to call this app. The arguments in this case depends on how the OS specify those arguments when calling this app.
As far as I have tested, in the case of SendTo, the full path of file is provided in the second argument obtained by Environment.GetCommandLineArgs method regardless of whether the path includes spaces.
For example, I can successfully call this app by SendTo from the context menu of C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe.
Could you show the actual file example which fails by SendTo?

from hashpad.

DocBrown101 avatar DocBrown101 commented on September 24, 2024

Yes, it probably has something to do with the operating system. If the path had been passed in double quotes, it would be correct and found in the second position in the args.

Due to the spaces in the path, the operating system incorrectly assumes additional parameters.

image

Therefore, I can't think of a solution for it at the moment. The SendTo would have to wrap the path in double quotes.

https://learn.microsoft.com/en-us/dotnet/api/system.environment.getcommandlineargs?view=net-7.0#remarks

from hashpad.

emoacht avatar emoacht commented on September 24, 2024

What are you intend to show by the screenshot?
I think the point is how the OS automatically provides the argument in the of SendTo. There is nothing this app can do when the OS provides it.
Then, could you give actual file example which fails by SendTo?

from hashpad.

DocBrown101 avatar DocBrown101 commented on September 24, 2024

Yes, that's right, it's something else entirely. I think we can close the bug. It only occurs on the E drive. But there I had all my iso files.

from hashpad.

emoacht avatar emoacht commented on September 24, 2024

So your E drive has something different from other drives because of mystical reasons.
Okay, I added a function to attempt to restore the full path from fragments. 71073ba
I don't know whether it would make any difference for your particular case though.

from hashpad.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.