/// <summary> /// The temporary path to put all of the transfer information for this session. /// </summary> /// <returns></returns> private string GenerateTemporarySessionPath() { //find the right temporary directory for us... //if this is a real repository, we'll use a persistent path. //otherwise we'll use something truly temporary and have to clean up after ourselves. string tempDirectory; if (Repository != null) { tempDirectory = Path.Combine(Repository.TempPath, SessionTempFolder); } else { tempDirectory = FileSystemTools.GetTempFileName(); File.Delete(tempDirectory); //we just want it as a directory, not a file. m_DeleteTemporaryFilesOnDispose = true; } //make damn sure it exists. Directory.CreateDirectory(tempDirectory); return(tempDirectory); }