mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
PACKAGE_INSTALL now stands for both installation and upgrades
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@795 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -541,7 +541,10 @@ void Packaged::saveAs(const String& package, bool remove_unused) {
|
||||
|
||||
void Packaged::validate(Version) {
|
||||
// a default for the short name
|
||||
if (short_name.empty()) short_name = name();
|
||||
if (short_name.empty()) {
|
||||
if (!full_name.empty()) short_name = full_name;
|
||||
short_name = name();
|
||||
}
|
||||
// check dependencies
|
||||
FOR_EACH(dep, dependencies) {
|
||||
packages.checkDependency(*dep, true);
|
||||
|
||||
@@ -293,7 +293,7 @@ bool PackageDirectory::install(const InstallablePackage& package) {
|
||||
String n = name(package.description->name);
|
||||
if (package.action & PACKAGE_REMOVE) {
|
||||
remove_file_or_dir(n);
|
||||
} else if ((package.action & PACKAGE_UPGRADE) || (package.action & PACKAGE_INSTALL)) {
|
||||
} else if (package.action & PACKAGE_INSTALL) {
|
||||
remove_file_or_dir(n + _(".new"));
|
||||
bool ok = actual_install(package, n + _(".new"));
|
||||
if (!ok) return false;
|
||||
|
||||
Reference in New Issue
Block a user