private string GetDir(string defaultPath) { return Path.IsPathRooted(defaultPath) ? Path.GetDirectoryName(defaultPath) : ""; }