Jump to content

Recommended Posts

//Add this at top of the EterPack.cpp

namespace bfs = boost::filesystem;

namespace
{
	bool is_ymir(const bfs::path& p)
	{
		auto it = p.begin();

		if (it == p.end() || *it != "d:")
			return false;

		++it;

		if (it == p.end())
			return false;

		if (*it == "/" || *it == "\\")
			++it;

		if (it == p.end() || *it != "ymir work")
			return false;

		return true;
	}
};

//Intro bool CEterPack::Put
//Add
	bfs::path packpath = ConvertPackFilename(filename);

	if (!is_ymir(packpath) && !packpath.is_relative())
		return false;

 

 

Link to comment
Share on other sites

Acum 13 minute, bumxd a spus:
// Open EterPack folder
//Find inline.h
// And paste this

	std::string ConvertPackFilename(const std::string& name)
	{
		std::string ret;
		std::transform(name.begin(), name.end(), std::back_inserter(ret), [](char ch) {
			if (ch == '\\')
				return '/';
			else
				return (char)tolower(ch);
		});
		return ret;
	}

I apologize for so many replies, I wrote these codes a long time ago. So I forgot all the code dependencies.

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.