* Fixed warning.

* Fixed creation of settings file. The second creat() parameter specifies the
  permission, not the open mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31216 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-06-23 22:11:45 +00:00
parent 4b8f258bfe
commit 57c3ecadb8
2 changed files with 4 additions and 3 deletions

View File

@ -494,7 +494,7 @@ TWindow::SetPrefs()
long ref;
path.Append (kPrefsFileName);
if ((ref = creat(path.Path(), O_RDWR)) >= 0) {
if ((ref = creat(path.Path(), S_IRUSR | S_IWUSR)) >= 0) {
float version = kCurrentVersion;
lseek (ref, 0, SEEK_SET);
@ -1683,7 +1683,7 @@ TMagnify::SaveImage(entry_ref* ref, char* name, bool selectionOnly)
void
TMagnify::SaveBits(BFile* file, const BBitmap *bitmap, char* name) const
TMagnify::SaveBits(BFile* file, const BBitmap *bitmap, const char* name) const
{
int32 bytesPerPixel;
const char *kColorSpaceName;

View File

@ -114,7 +114,8 @@ class TMagnify : public BView {
void StartSave();
void SaveImage(entry_ref* ref, char* name, bool selectionOnly=false);
void SaveBits(BFile* file, const BBitmap *bitmap, char* name) const;
void SaveBits(BFile* file, const BBitmap *bitmap,
const char* name) const;
void EndSave();
private: