mirror of
https://github.com/vgough/encfs.git
synced 2024-11-25 01:13:12 +01:00
ensure paths end in '/'. fixes launchpad bug 184905
git-svn-id: http://encfs.googlecode.com/svn/trunk@9 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
72625ab441
commit
8c2546510a
@ -413,9 +413,22 @@ static int copyContents(const shared_ptr<EncFS_Root> &rootInfo,
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static bool endsWith(const string &str, char ch)
|
||||
{
|
||||
if(str.empty())
|
||||
return false;
|
||||
else
|
||||
return str[str.length()-1] == ch;
|
||||
}
|
||||
|
||||
static int traverseDirs(const shared_ptr<EncFS_Root> &rootInfo,
|
||||
string volumeDir, string destDir)
|
||||
{
|
||||
if(!endsWith(volumeDir, '/'))
|
||||
volumeDir.append("/");
|
||||
if(!endsWith(destDir, '/'))
|
||||
destDir.append("/");
|
||||
|
||||
// Lookup directory node so we can create a destination directory
|
||||
// with the same permissions
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user