mirror of
https://github.com/vgough/encfs.git
synced 2025-02-22 20:51:18 +01:00
Replace ternary operators in cipherPathWithoutRoot with if clause
Adds a few lines but makes clear what is happening.
This commit is contained in:
parent
8eea3be2db
commit
73b2f7c850
@ -304,10 +304,14 @@ string DirNode::cipherPathWithoutRoot(const char *plaintextPath) {
|
||||
string DirNode::plainPath(const char *cipherPath_) {
|
||||
try {
|
||||
// Handle special absolute path encodings.
|
||||
char mark = fsConfig->reverseEncryption ? '/' : '+';
|
||||
char mark = '+';
|
||||
string prefix = "/";
|
||||
if (fsConfig->reverseEncryption) {
|
||||
mark = '/';
|
||||
prefix = "+";
|
||||
}
|
||||
if (cipherPath_[0] == mark) {
|
||||
return string(fsConfig->reverseEncryption ? "+" : "/") +
|
||||
naming->decodeName(cipherPath_ + 1, strlen(cipherPath_ + 1));
|
||||
return prefix + naming->decodeName(cipherPath_ + 1, strlen(cipherPath_ + 1));
|
||||
}
|
||||
|
||||
// Default.
|
||||
|
Loading…
Reference in New Issue
Block a user