diff --git a/source/src/templates.cpp b/source/src/templates.cpp index 9cdc314..46c9f35 100644 --- a/source/src/templates.cpp +++ b/source/src/templates.cpp @@ -57,7 +57,8 @@ return template_info( template_name, mLocalPath.string(), - path + path, + fast ); } @@ -207,7 +208,8 @@ return template_info( template_name, "Registry: " + mRegistry.name + " (cached)", - template_cache_dir + template_cache_dir, + fast ); } @@ -245,7 +247,8 @@ return template_info( template_name, "Registry: " + mRegistry.name + " (cached)", - template_cache_dir + template_cache_dir, + fast ); } warning << "Failed to get metadata for template: " << template_name << std::endl; @@ -395,7 +398,8 @@ return template_info( template_name, "Registry: " + mRegistry.name, - template_cache_dir + template_cache_dir, + fast ); } @@ -703,7 +707,7 @@ return instance; } - template_info::template_info(const std::string &template_name, const std::string &location_id, const std::filesystem::path &local_template_path) : + template_info::template_info(const std::string &template_name, const std::string &location_id, const std::filesystem::path &local_template_path, bool fast) : mTemplateName(template_name), mLocationID(location_id), mTemplateLocalPath(local_template_path), @@ -717,7 +721,8 @@ return; } - mHash = hash_directory_recursive(local_template_path); + if (!fast) + mHash = hash_directory_recursive(local_template_path); } } // namespace dropshell diff --git a/source/src/templates.hpp b/source/src/templates.hpp index 773b9bc..f4a18f7 100644 --- a/source/src/templates.hpp +++ b/source/src/templates.hpp @@ -20,7 +20,7 @@ typedef enum template_source_type { class template_info { public: template_info() : mIsSet(false) {} - template_info(const std::string& template_name, const std::string& location_id, const std::filesystem::path& local_template_path); + template_info(const std::string& template_name, const std::string& location_id, const std::filesystem::path& local_template_path, bool fast); virtual ~template_info() {} bool is_set() const { return mIsSet; } std::string name() const { return mTemplateName; }