emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bfc5423 1/2: Check if file is in iCloud drive (bug#38618)


From: Alan Third
Subject: master bfc5423 1/2: Check if file is in iCloud drive (bug#38618)
Date: Sun, 22 Dec 2019 06:49:09 -0500 (EST)

branch: master
commit bfc54230c56dc85cd8a8073962cf6ed00758e1a6
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>

    Check if file is in iCloud drive (bug#38618)
    
    * src/nsfns.m (ns_set_represented_filename): Check whether the file is
    a `ubiquitous item', and if so don't display a proxy icon.
---
 src/nsfns.m | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/nsfns.m b/src/nsfns.m
index 4c1fb76..1d3aea0 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -490,6 +490,17 @@ ns_set_represented_filename (struct frame *f)
   else
     fstr = @"";
 
+#if defined (NS_IMPL_COCOA) && defined (MAC_OS_X_VERSION_10_7)
+  /* Work around for Mach port leaks on macOS 10.15 (bug#38618).  */
+  NSURL *fileURL = [NSURL fileURLWithPath:fstr isDirectory:NO];
+  BOOL isUbiquitousItem = YES;
+  [fileURL getResourceValue:(id *)&isUbiquitousItem
+                     forKey:NSURLIsUbiquitousItemKey
+                      error:nil];
+  if (isUbiquitousItem)
+    fstr = @"";
+#endif
+
 #ifdef NS_IMPL_COCOA
   /* Work around a bug observed on 10.3 and later where
      setTitleWithRepresentedFilename does not clear out previous state



reply via email to

[Prev in Thread] Current Thread [Next in Thread]