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

Bookmark with '/' in nickname can't be saved to Finder #933

Closed
cyberduck opened this issue Oct 18, 2006 · 5 comments
Closed

Bookmark with '/' in nickname can't be saved to Finder #933

cyberduck opened this issue Oct 18, 2006 · 5 comments
Assignees
Labels
Milestone

Comments

@cyberduck
Copy link
Collaborator

8fbae90 created the issue

When creating a bookmark with a '/' character in the nickname field, Cyberduck will fail to allow you to drag the file to the Finder.

Unfortunately, it does not give any indication that it has failed, it simply doesn't create the file.

-(Additional testing shows that if a folder matching the pre-/ portion of the nickname exists, Cyberduck will create a file inside that folder with only the post-/ portion of the nickname as the bookmark filename. - I.e. Cyberduck is not escaping path components well in its file creation/naming routine.)*

The fix would appear to simply be checking for the '/' character in nicknames before completing the drag operation and converting any and all of them that are found into ':' characters (which the Finder represents as '/' to the user) so that the bookmark is created in the expected location with it's appropriate name.

-(Bookmarks with ':' characters might ought to be a special case too due to their special history as path separators in old Mac OS versions... but they appear to work just fine as is and merely appear in the Finder with a '/' instead of the ':' as might be expected anyway. So it isn't really "necessary" to handle them in any special way.)*

Optionally, if there is some exceptional problem I haven't foreseen in fixing this, then there should at the very least be a warning message generated by Cyberduck if dragging the bookmark fails. Currently, absolutely nothing happens at the end of the drag operation, and that is not good for the user experience.

@cyberduck
Copy link
Collaborator Author

8fbae90 commented

Actually, I suppose this should have been marked for the interface component. And I hope this is minor enough of a fix to make 2.6.3, so that's what I set it to, though I'm sure you'll change that if it was presumptuous of me.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Fixed in 0fe3928.

@cyberduck
Copy link
Collaborator Author

8fbae90 commented

I don't want to second guess you too much, because I don't know the code for Cyberduck well (or at all really), and am only a Java programmer in the loosest sense of the term...

But should you perhaps also change line 312 of http://trac.cyberduck.ch/browser/trunk/source/ch/cyberduck/ui/cocoa/CDBookmarkTableDataSource.java?rev=2462 ... which I presume are the filenames the receiving app will "see", so that they match the filenames from line 310, which I assume are the filenames you actually end up using to write into, correct? ... Or are those names not used the way I think they are?

Just checking. Please ignore me if I'm mistaken.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

jamescat, many thanks for spotting this error! See b718e07.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Revised patch in bae3f6f.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants