mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 09:18:55 +00:00
This fixes an issue with caching when the creation of a subdirectory within the cache is aborted because a common cached parent directory already exists.
This commit is contained in:
parent
eb97054f49
commit
d7d96907cf
@ -549,15 +549,13 @@ int mkdirp(const string& path, mode_t mode)
|
||||
string base;
|
||||
string component;
|
||||
stringstream ss(path);
|
||||
int result = 0;
|
||||
while (getline(ss, component, '/')) {
|
||||
base += "/" + component;
|
||||
int result = mkdir(base.c_str(), mode);
|
||||
if(0 != result){
|
||||
result = mkdir(base.c_str(), mode);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool delete_files_in_dir(const char* dir, bool is_remove_own)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user