Fix incorrect masking in encfsctl export's copyContents

Code did not properly detect when a file had S_IFLNK mode
This commit is contained in:
Charles Munson 2016-05-23 23:07:16 +02:00
parent ad43aa10b2
commit d2f243a195

View File

@ -453,7 +453,7 @@ static int copyContents(const std::shared_ptr<EncFS_Root> &rootInfo,
if (node->getAttr(&st) != 0) return EXIT_FAILURE;
if ((st.st_mode & S_IFLNK) == S_IFLNK) {
if ((st.st_mode & S_IFMT) == S_IFLNK) {
string d = rootInfo->root->cipherPath(encfsName);
char linkContents[PATH_MAX + 2];