@@ -688,8 +688,8 @@ namespace {
688
688
};
689
689
690
690
struct TModifyPermissionsWrapper : public TThrRefBase {
691
- using TMethod = std::function<void (NYql::TModifyPermissionsSettings::EAction action, THashSet<TString>&& permissions, THashSet<TString>&& roles, TVector<TString>&& pathes )>;
692
- TMethod ModifyPermissionsForPathes ;
691
+ using TMethod = std::function<void (NYql::TModifyPermissionsSettings::EAction action, THashSet<TString>&& permissions, THashSet<TString>&& roles, TVector<TString>&& paths )>;
692
+ TMethod ModifyPermissionsForPaths ;
693
693
};
694
694
}
695
695
@@ -1275,18 +1275,18 @@ class TKikimrIcGateway : public IKqpGateway {
1275
1275
return MakeFuture (ResultFromError<TGenericResult>(" No permissions names for modify permissions" ));
1276
1276
}
1277
1277
1278
- if (settings.Pathes .empty ()) {
1279
- return MakeFuture (ResultFromError<TGenericResult>(" No pathes for modify permissions" ));
1278
+ if (settings.Paths .empty ()) {
1279
+ return MakeFuture (ResultFromError<TGenericResult>(" No paths for modify permissions" ));
1280
1280
}
1281
1281
1282
1282
if (settings.Roles .empty ()) {
1283
1283
return MakeFuture (ResultFromError<TGenericResult>(" No roles for modify permissions" ));
1284
1284
}
1285
1285
1286
1286
TVector<TPromise<TGenericResult>> promises;
1287
- promises.reserve (settings.Pathes .size ());
1287
+ promises.reserve (settings.Paths .size ());
1288
1288
TVector<TFuture<TGenericResult>> futures;
1289
- futures.reserve (settings.Pathes .size ());
1289
+ futures.reserve (settings.Paths .size ());
1290
1290
1291
1291
NACLib::TDiffACL acl;
1292
1292
switch (settings.Action ) {
@@ -1322,9 +1322,9 @@ class TKikimrIcGateway : public IKqpGateway {
1322
1322
const auto serializedDiffAcl = acl.SerializeAsString ();
1323
1323
1324
1324
TVector<std::pair<const TString*, std::pair<TString, TString>>> pathPairs;
1325
- pathPairs.reserve (settings.Pathes .size ());
1326
- for (const auto & path : settings.Pathes ) {
1327
- pathPairs.push_back (std::make_pair (&path, SplitPathByDirAndBaseNames (path)));
1325
+ pathPairs.reserve (settings.Paths .size ());
1326
+ for (const auto & path : settings.Paths ) {
1327
+ pathPairs.push_back (std::make_pair (&path, NSchemeHelpers :: SplitPathByDirAndBaseNames (path)));
1328
1328
}
1329
1329
1330
1330
for (const auto & path : pathPairs) {
@@ -2311,14 +2311,6 @@ class TKikimrIcGateway : public IKqpGateway {
2311
2311
}
2312
2312
2313
2313
private:
2314
- static std::pair<TString, TString> SplitPathByDirAndBaseNames (const TString& path) {
2315
- auto splitPos = path.find_last_of (' /' );
2316
- if (splitPos == path.npos || splitPos + 1 == path.size ()) {
2317
- ythrow yexception () << " wrong path format '" << path << " '" ;
2318
- }
2319
- return {path.substr (0 , splitPos), path.substr (splitPos + 1 )};
2320
- }
2321
-
2322
2314
static TListPathResult GetListPathResult (const TPathDescription& pathDesc, const TString& path) {
2323
2315
if (pathDesc.GetSelf ().GetPathType () != EPathTypeDir) {
2324
2316
return ResultFromError<TListPathResult>(TString (" Directory not found: " ) + path);
0 commit comments