mirror of
https://github.com/vgough/encfs.git
synced 2025-06-20 11:47:58 +02: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_) {
|
string DirNode::plainPath(const char *cipherPath_) {
|
||||||
try {
|
try {
|
||||||
// Handle special absolute path encodings.
|
// Handle special absolute path encodings.
|
||||||
char mark = fsConfig->reverseEncryption ? '/' : '+';
|
char mark = '+';
|
||||||
|
string prefix = "/";
|
||||||
|
if (fsConfig->reverseEncryption) {
|
||||||
|
mark = '/';
|
||||||
|
prefix = "+";
|
||||||
|
}
|
||||||
if (cipherPath_[0] == mark) {
|
if (cipherPath_[0] == mark) {
|
||||||
return string(fsConfig->reverseEncryption ? "+" : "/") +
|
return prefix + naming->decodeName(cipherPath_ + 1, strlen(cipherPath_ + 1));
|
||||||
naming->decodeName(cipherPath_ + 1, strlen(cipherPath_ + 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default.
|
// Default.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user