Changed: #1440 Moved some more filepath functions

--HG--
branch : build_pipeline_v3
hg/feature/build_pipeline_v3
kaetemi 12 years ago
parent 08acf2b63b
commit aae321f9e7

@ -119,7 +119,7 @@ bool CDatabaseStatus::getFileStatus(std::map<std::string, CFileStatus> &fileStat
return false;
}
std::string dirPathMeta = CWorkspaceStorage::getMetaFilePath(dirPath, "");
std::string dirPathMeta = CWorkspaceStorage::getMetaDirectoryPath(dirPath);
std::vector<std::string> dirContentsMeta;
CPath::getPathContent(dirPathMeta, false, false, true, dirContentsMeta);
@ -446,7 +446,7 @@ void updateDirectoryStatus(CDatabaseStatus* ds, CDatabaseStatusUpdater &updater,
// Note that we won't notice when a directory is deleted, this is also not necessary because we never work recursively in the service.
// Any recursive lookups are done in specific unsafe build tools that are tagged as unsafe and not monitored by the pipeline.
std::string dirPathMeta = CWorkspaceStorage::getMetaFilePath(dirPath, "");
std::string dirPathMeta = CWorkspaceStorage::getMetaDirectoryPath(dirPath);
// nldebug("META DIR: %s", dirPathMeta.c_str());
std::vector<std::string> dirContentsMeta;

@ -135,6 +135,7 @@ public:
static void writeStatus(const CFileStatus &status, const std::string &path);
static void eraseStatus(const std::string &path);
static std::string getRemovePath(const std::string &file);
static bool readRemove(CFileRemove &remove, const std::string & path);
static void createRemove(const CFileRemove &remove, const std::string &path); // Remove cannot be modified after creation, only erased.
static void eraseRemove(const std::string &path);

@ -139,6 +139,12 @@ std::string CWorkspaceStorage::getMetaFilePath(const std::string &path, const st
}
}
std::string CWorkspaceStorage::getMetaDirectoryPath(const std::string &path)
{
// Not very sane, but works.
return standardizePath(CWorkspaceStorage::getMetaFilePath(path, ""), true);
}
} /* namespace PIPELINE */
/* end of file */

@ -52,6 +52,9 @@ public:
/// Get the path for a metadata file, based on a filepath it represents, and the suffix of it's contents
static std::string getMetaFilePath(const std::string &path, const std::string &dotSuffix);
/// Get the directory where metadata files are stored, based on the filepath containing the files which the containing metadata represents
static std::string getMetaDirectoryPath(const std::string &path);
}; /* class CWorkspaceStorage */
} /* namespace PIPELINE */

Loading…
Cancel
Save