Skip to content

Commit

Permalink
Create a DirectoryInfo directly from the password store dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Geluk committed Dec 9, 2016
1 parent 4f268f7 commit e93cfe2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pass-winmenu/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,7 @@ private static string[] GetGpgIds(string path)
? new DirectoryInfo(path)
: new FileInfo(path).Directory;

var pwStoreDir = File.GetAttributes(ConfigManager.Config.PasswordStore).HasFlag(FileAttributes.Directory)
? new DirectoryInfo(path)
: new FileInfo(path).Directory;
var pwStoreDir = new DirectoryInfo(ConfigManager.Config.PasswordStore);

// Ensure the password file directory is actually located in the password store.
if (!pwStoreDir.IsParentOf(startDir))
Expand Down

0 comments on commit e93cfe2

Please sign in to comment.