public static bool Robust_DirectoryExistsAndIsWritable_NoExceptions(string Directoryname) { bool bFound = false; if (!CommandUtils.DirectoryExistsAndIsWritable_NoExceptions(Directoryname)) { // mac is terrible on shares, this isn't a solution, but a stop gap if (Directoryname.StartsWith("/Volumes/")) { int Retry = 0; int NumRetries = 60; if (!Directoryname.Contains("UE4")) { NumRetries = 2; } while (!bFound && Retry < NumRetries) { //@todo: These retries should be reported so we can track how often they are occurring. CommandUtils.LogInformation("*** Mac temp storage retry {0}", Directoryname); System.Threading.Thread.Sleep(1000); bFound = CommandUtils.DirectoryExistsAndIsWritable_NoExceptions(Directoryname); Retry++; } } } else { bFound = true; } return(bFound); }