Updated signature; replaced "obos" with "haiku".

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18583 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-08-23 09:56:32 +00:00
parent 1d130feff7
commit 3e16073da7
3 changed files with 52 additions and 42 deletions

View File

@ -2,7 +2,7 @@
* ZipOMatic.rdef
*/
resource app_signature "application/x-vnd.obos.zip-o-matic";
resource app_signature "application/x-vnd.haiku.zip-o-matic";
resource app_flags B_SINGLE_LAUNCH;

View File

@ -1,47 +1,53 @@
// license: public domain
// authors: jonas.sundstrom@kirilla.com
/*
* Copyright 2003-2006, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jonas Sundström, jonas.sundstrom@kirilla.com
*/
#include "ZipOMaticMisc.h"
#include <Debug.h>
#include <Path.h>
#include <string.h>
status_t
find_and_create_directory (directory_which a_which, BVolume * a_volume, const char * a_relative_path, BPath * a_full_path)
find_and_create_directory(directory_which which, BVolume* volume,
const char* relativePath, BPath* fullPath)
{
status_t status = B_OK;
BPath path;
mode_t mask = 0;
status = find_directory (a_which, & path, true, a_volume); // create = true
BPath path;
status_t status = find_directory(which, &path, true, volume);
if (status != B_OK)
return status;
if (a_relative_path != NULL)
{
path.Append(a_relative_path);
mask = umask (0);
umask (mask);
status = create_directory (path.Path(), mask);
if (relativePath != NULL) {
path.Append(relativePath);
mode_t mask = umask(0);
umask(mask);
status = create_directory(path.Path(), mask);
if (status != B_OK)
return status;
}
if (a_full_path != NULL)
{
status = a_full_path->SetTo(path.Path());
if (fullPath != NULL) {
status = fullPath->SetTo(path.Path());
if (status != B_OK)
return status;
}
return B_OK;
}
void
error_message (const char * a_text, int32 a_status)
void
error_message(const char* text, int32 status)
{
PRINT(("%s: %s\n", a_text, strerror(a_status)));
PRINT(("%s: %s\n", text, strerror(status)));
}

View File

@ -1,24 +1,28 @@
#ifndef __ZIPOMATIC_MISC__
#define __ZIPOMATIC_MISC__
/*
* Copyright 2003-2006, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jonas Sundström, jonas.sundstrom@kirilla.com
*/
#ifndef ZIPOMATIC_MISC_H
#define ZIPOMATIC_MISC_H
#include <stdlib.h>
#include <stdio.h>
#include <String.h>
#include <SupportDefs.h>
#include <Volume.h>
#include <Path.h>
#include <Directory.h>
#include <FindDirectory.h>
#define ZIPOMATIC_APP_SIG "application/x-vnd.obos.zip-o-matic"
class BPath;
class BVolume;
#define ZIPOMATIC_APP_SIG "application/x-vnd.haiku.zip-o-matic"
#define ZIPOMATIC_APP_NAME "ZipOMatic"
#define ZIPPO_WINDOW_QUIT 'winq'
#define ZIPPO_WINDOW_QUIT 'winq'
status_t find_and_create_directory (directory_which a_which, BVolume * a_volume = NULL, const char * a_relative_path = NULL, BPath * a_full_path = NULL);
void error_message (const char * a_text, int32 a_status);
#endif // __ZIPOMATIC_MISC__
status_t find_and_create_directory(directory_which which, BVolume* volume = NULL,
const char* relativePath = NULL, BPath* fullPath = NULL);
void error_message(const char* text, int32 status);
#endif // ZIPOMATIC_MISC_H