mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Patch config and hpfs sync refactor. (#208)
* Terminology changes from state to hpfs. * Syncing hpfs parents in priority order. * Changing how the hash is calculate in hpfs response validate check.
This commit is contained in:
committed by
GitHub
parent
a16eb39d1f
commit
c87ae6693d
@@ -355,6 +355,15 @@ namespace util
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Returns the file/dir name of the given path.
|
||||
const std::string get_name(std::string_view path)
|
||||
{
|
||||
char *path2 = strdup(path.data());
|
||||
const std::string name = basename(path2);
|
||||
free(path2);
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a record lock for the file descriptor. Lock is associated with the process (Not for forked child processes).
|
||||
* @param fd File descriptor to be locked.
|
||||
|
||||
Reference in New Issue
Block a user