Revision: 29627
http://sourceforge.net/p/bibdesk/svn/29627
Author: hofman
Date: 2025-09-24 14:37:07 +0000 (Wed, 24 Sep 2025)
Log Message:
-----------
Add https scheme when url does not have a scheme
Modified Paths:
--------------
trunk/bibdesk/BDSKURLSheetController.m
Modified: trunk/bibdesk/BDSKURLSheetController.m
===================================================================
--- trunk/bibdesk/BDSKURLSheetController.m 2025-09-23 16:04:35 UTC (rev
29626)
+++ trunk/bibdesk/BDSKURLSheetController.m 2025-09-24 14:37:07 UTC (rev
29627)
@@ -69,9 +69,14 @@
NSString *urlString = [self urlString];
if ([NSString isEmptyString:urlString])
return nil;
- if ([urlString rangeOfString:@"://"].location == NSNotFound)
- urlString = [@"https://" stringByAppendingString:urlString];
- return [NSURL URLWithStringByNormalizingPercentEscapes:urlString];
+ NSURL *url = [NSURL URLWithStringByNormalizingPercentEscapes:urlString];
+ if ([url scheme] == nil) {
+ if ([urlString isAbsolutePath])
+ url = [NSURL fileURLWithPath:urlString];
+ else
+ url = [NSURL URLWithStringByNormalizingPercentEscapes:[@"https://"
stringByAppendingString:urlString]];
+ }
+ return url;
}
- (void)openBookmark:(id)sender {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit