AK.F1.Timing.Utility.Recorder.Program.MakeRecordPath C# (CSharp) Method

MakeRecordPath() private method

private MakeRecordPath ( string session, string &path ) : bool
session string
path string
return bool
        private bool MakeRecordPath(string session, out string path)
        {
            path = session;
            if(!path.EndsWith(TmsExtension, StringComparison.OrdinalIgnoreCase))
            {
                path += TmsExtension;
            }
            if(!Path.IsPathRooted(path))
            {
                path = Path.Combine(Environment.CurrentDirectory, path);
            }
            try
            {
                Directory.CreateDirectory(Path.GetDirectoryName(path));
                return true;
            }
            catch(IOException exc)
            {
                Log.Error(exc);
                return false;
            }
        }