You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-12-10 22:42:30 +03:00
Added an 'ls' type tool, and fixed a couple things in IOC
around handling things that aren't .meta files.
This commit is contained in:
@@ -81,6 +81,9 @@ target_link_libraries(smcat storagemanager)
|
||||
add_executable(smput src/smput.cpp)
|
||||
target_link_libraries(smput storagemanager)
|
||||
|
||||
add_executable(smls src/smls.cpp)
|
||||
target_link_libraries(smls storagemanager)
|
||||
|
||||
#install(TARGETS StorageManager DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
|
||||
|
||||
@@ -519,7 +519,12 @@ int IOCoordinator::listDirectory(const char *dirname, vector<string> *listing)
|
||||
|
||||
bf::directory_iterator end;
|
||||
for (bf::directory_iterator it(p); it != end; it++)
|
||||
listing->push_back(it->path().stem().string());
|
||||
{
|
||||
if (bf::is_directory(it->path()))
|
||||
listing->push_back(it->path().filename().string());
|
||||
else
|
||||
listing->push_back(it->path().stem().string());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -528,6 +533,9 @@ int IOCoordinator::stat(const char *_path, struct stat *out)
|
||||
bf::path p(_path);
|
||||
const char *path = p.string().c_str();
|
||||
|
||||
if (bf::is_directory(metaPath/p))
|
||||
return ::stat((metaPath/p).string().c_str(), out);
|
||||
|
||||
ScopedReadLock s(this, path);
|
||||
MetadataFile meta(path, MetadataFile::no_create_t());
|
||||
return meta.stat(out);
|
||||
|
||||
Reference in New Issue
Block a user