This project is read-only.
1
Vote

Don't loop forever when trying to create a directory

description

My decompiler found the following code in MetadataAsSourceFileService.GetGeneratedFileAsync:
            while (!Directory.Exists(var_15))
            {
                try
                {
                    Directory.CreateDirectory(var_15);
                }
                catch (DirectoryNotFoundException)
                {
                }
                catch (UnauthorizedAccessException)
                {
                }
            }
This seems like a bad idea; the loop should be bounded.

comments