mirror of
https://github.com/clechasseur/pathcopycopy.git
synced 2026-04-25 12:15:58 +03:00
[GH-ISSUE #54] Bug: Copy UNC Parent Folder Path does not work with network mapped drives #54
Labels
No labels
bug
duplicate
enhancement
enhancement
enhancement
fixed
help wanted
help wanted
invalid
pull-request
question
waiting for input
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pathcopycopy#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jan 21, 2019).
Original GitHub issue: https://github.com/clechasseur/pathcopycopy/issues/54
Originally assigned to: @clechasseur on GitHub.
I have this network drive mapped to the following path: \ServerName\E$\media
This network location is mapped to drive (E:)
When right-clicking drive (E:) and using PathCopyCopy's Copy UNC Parent Folder Path function directly on the mapped drive icon, logically, in this case, it should copy the path \ServerName\E$ to the clipboard since it is the UNC Parent Folder of \ServerName\E$\media
Well in this case, it does NOT. It only copies the drive letter as is, so E: in this case. So just the letter and the colon, thats it. I do not know if PathCopyCopy is like this by design, but I think this is an issue.
FYI, the paths do have the double slashes, but for some reason, it only shows one once I save my comment.
@clechasseur commented on GitHub (Jan 22, 2019):
I can sorta reproduce this. Can you validate this: is
\\ServerName\E$a valid share in itself? If you try to open it, does it work?@ghost commented on GitHub (Jan 22, 2019):
Yes, it is absolutely a valid share.
@clechasseur commented on GitHub (Jan 22, 2019):
I know what's happening. It's not a "bug" in the sense that it is coded to work this way, but I agree that it is misleading. I will fix it.
@ghost commented on GitHub (Jan 22, 2019):
Well technically the E: drive is the Parent Folder Path, but not the UNC Parent Folder Path
@clechasseur commented on GitHub (Jan 22, 2019):
Exactly. The command currently fetches the path to the parent folder on disk, then fetches that path's UNC equivalent. The problem is that if you use this on a root drive, it doesn't work.
@ghost commented on GitHub (Jan 23, 2019):
Well, you seem to know how to make it work. Overall though, you developed a good product here. Props.
@clechasseur commented on GitHub (Aug 14, 2019):
Okay, I've had a bit more time to toy with this and ponder the implications. I have decided to leave this as-is. Changing it would be a breaking change, since it changes the core implementation - even if a little misleading.
In order to do what you want, it's possible to create a custom command. Choose "Copy Long UNC Path" as Base Command and in Find/Replace, choose "Use regular expressions" and enter the following expression:
Find what:
^(.*)(\\|/)[^\\/]+(\\|/)?$Replace with:
$1This should achieve the result you want.
@ghost commented on GitHub (Sep 5, 2019):
Charles, I did as you suggested and it works, so I think this is perfectly fine. A bit unorthodox, but works as required. Its a good workaround, and since its a custom command, I just named it "Copy Mapped Drive UNC Parent Folder Path". So it still all makes sense.