Windows File Explorer path is not recognized as a link when there are spaces in it

WHAT IS THE BUG
If I paste a link of windows file explore. like” D:\ Epic games”I copied, app won’t pop out a window and ask me if i’d like to paste them as a link, bookmark or text.

HOW TO REPRODUCE IT
just paste any local folder link with a space in path.

THE EXPECTED BEHAVIOR
App should ask me what form I want to paste.

SYSTEM INFORMATION

  • Device:
    pc
  • OS:
    win10
  • Anytype Version:
    v.0.36.19 -beta

It should not, path is not a link in any way, file://D:/Epic%20games is a link.

1 Like

I mean, the path I copied from windows file explore. not in the web browser.
App do recognize “ D:\Epicgames”. But can not recognize “ D:\Epic games”

Confirmed

demobugAnytype

Here has a related problem, please kindly check this to @Razor

1 Like

As Razor mentioned “file://D:/Epic%20games is a link.”, you need to use %20 for spaces iirc.

%20 is a space, urls should be url encoded and to be clear, if you want local paths to be openable by the app they should be treated differently from urls, as urls open default browser and local paths open file or directory with registered editor for that file type or file explorer respectively. So basically what I’m trying to say that this is a separate issue from local paths being treated as urls.

2 Likes

thank you,i get it. I just can’t find a way to open a local path in anytype.

2 Likes

I add a record.hope it can express my point precisely

thank you, I do find some old post that said they could use “file://” to make a hyper link to local path. but it doesn’t work now…

@4thHydro Videos encoded in H265 don’t work on discourse.

I updated video

I’m not thrilled with the explanation. I don’t want to have to manually enter “file://” and several “%20” each time.
Instead of an answer explaining the causes of the current limitation, I rather expect the staff to propose to work on the solution.
There are already several programs that can do this, so it’s obviously feasible to support these Local paths automatically.

  1. Detect local paths and list them in the popup window.
  2. Auto-complete “file://” syntax if selected.
  3. Automatically replace spaces with “%20”.
    Slice 1

I understand that there’s work to be done and that this isn’t the priority, but I think it would be more than appreciated to hear that you’ll be working on a proper solution rather than letting us believe that we’ll have to deal with this limitation.

1 Like

A post was merged into an existing topic: Open a link of local file,but only open root page of win10 explore which is “this pc”

This was posted as a bug report, hence why Razor is treating it as such. If you want local paths to be auto-detected or similar, please write a separate FR.

That’s right, but it would just clutter up the forum. It’s either a bug or a feature request. So if the OP agrees, it would be better to turn this post into a FR, right?

There are a couple of different issues here, and they should all ideally have separate bug reports or FRs. It also doesn’t help that the OP created two very similar bug reports. I will try to combine / separate all of these properly next week.

1 Like

I’d rather think it’s a bug. Because if you paste a local path without space. Anytype do recognize and can open a file explore if you click it. So i think it’s a bug. And there is another bug that the opened window always points to “this pc”. I also post it.

Regular windows file explorer paths are recognized as links in the app - Clicking on a local file path link only opens the file explorer without opening the path - #12 by Filip. Seems like this is where the confusion stems from.

@4thHydro file:// doesn’t seem to work for me neither at the moment - File:// doesn't work when linking local paths. But you should be able to use these after this is fixed. The alternative for me was to use file:/// instead of file://, but seems like file:/// is also not recognized as a link in normal links (still works in URL relation types) - File:/// is not recognized as a link.
Per your other bug report (Clicking on a local file path link only opens the file explorer without opening the path), AT recognizing these windows file explorer paths is also probably a bug, and it shouldn’t happen, since it doesn’t actually work.

@4thHydro I’ve clarified this topic a bit, and also created several others for other related issues. This discussion was originally about the windows file explorer paths not being recognized as links if they contain spaces. From Razors point of view, none of these should be recognized as links since they are not using the proper syntax for file paths (you need to use file://…).
Also, bug reports should only be used for bugs. If you want something new to be implemented, use feature requests instead. It won’t clutter up the forum, we clean it up regularly. It’s much more useful for us if the topics are properly separated.

Hopefully everything is a lot more clearer now.

Here’s the FR - Convert Windows Explorer path to a proper local file path when pasting as a link.

2 Likes