Abstracting testbed prepended name components

Change-Id: Ieb3b3971fb09e31ddb15d85b5907ee7be41ef6ae
diff --git a/src/file-manifest.hpp b/src/file-manifest.hpp
index e11b560..ee04fdd 100644
--- a/src/file-manifest.hpp
+++ b/src/file-manifest.hpp
@@ -21,6 +21,8 @@
 #ifndef INCLUDED_FILE_MANIFEST_HPP
 #define INCLUDED_FILE_MANIFEST_HPP
 
+#include "util/shared-constants.hpp"
+
 #include <cstring>
 #include <memory>
 #include <string>
@@ -312,7 +314,9 @@
 inline std::string
 FileManifest::file_name() const
 {
-  return name().getSubName(3, name().size() - 4).toUri();
+  Name scheme(SharedConstants::commonPrefix);
+  return name().getSubName(1 + scheme.size(),
+         name().size() - (2 + scheme.size())).toUri();
 }