Now sets the "other" unchanged version info to {0} if it doesn't exist yet - this
should work around bug #681 on R5. Please test. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20076 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+13
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2002, Ryan Fleet.
|
||||
* Copyright 2006, Axel Dörfler, [email protected].
|
||||
* Copyright 2006-2007, Axel Dörfler, [email protected].
|
||||
*
|
||||
* Distributed under the terms of the MIT license.
|
||||
*/
|
||||
@@ -332,6 +332,18 @@ main(int argc, char *argv[])
|
||||
if (status != B_OK)
|
||||
errorOut(status, argv[1], false);
|
||||
|
||||
if (systemModified ^ appModified) {
|
||||
// clear out other app info if not present - this works around a
|
||||
// bug in BeOS, see bug #681.
|
||||
version_kind kind = systemModified ? B_APP_VERSION_KIND : B_SYSTEM_VERSION_KIND;
|
||||
version_info clean;
|
||||
|
||||
if (info.GetVersionInfo(&clean, kind) != B_OK) {
|
||||
memset(&clean, 0, sizeof(version_info));
|
||||
info.SetVersionInfo(&clean, kind);
|
||||
}
|
||||
}
|
||||
|
||||
if (appModified) {
|
||||
status = info.SetVersionInfo(&appVersion, B_APP_VERSION_KIND);
|
||||
if (status < B_OK)
|
||||
|
||||
Reference in New Issue
Block a user