Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OBITools3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools3
Commits
65c1b1e8
Commit
65c1b1e8
authored
Nov 09, 2015
by
Celine Mercier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to make the creation of files and directories cleaner
parent
b37bd8f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/obidms.c
src/obidms.c
+3
-0
src/obidmscolumn.c
src/obidmscolumn.c
+2
-2
No files found.
src/obidms.c
View file @
65c1b1e8
...
...
@@ -128,7 +128,10 @@ OBIDMS_p obi_create_dms(const char* dms_name)
if
(
mkdir
(
directory_name
,
00777
)
<
0
)
{
if
(
errno
==
EEXIST
)
{
obi_set_errno
(
OBIDMS_EXIST_ERROR
);
obidebug
(
1
,
"
\n
An OBIDMS directory with the same name already exists in this directory."
);
}
else
obi_set_errno
(
OBIDMS_UNKNOWN_ERROR
);
obidebug
(
1
,
"
\n
Problem creating an OBIDMS directory"
);
...
...
src/obidmscolumn.c
View file @
65c1b1e8
...
...
@@ -338,7 +338,7 @@ static obiversion_t create_version_file(OBIDMS_column_directory_p column_directo
return
-
1
;
// Get the file descriptor associated to the version file
version_file_descriptor
=
openat
(
column_directory
->
dir_fd
,
version_file_name
,
O_RDWR
|
O_CREAT
,
0777
);
version_file_descriptor
=
openat
(
column_directory
->
dir_fd
,
version_file_name
,
O_RDWR
|
O_CREAT
|
O_EXCL
,
0777
);
if
(
version_file_descriptor
<
0
)
{
obi_set_errno
(
OBICOL_UNKNOWN_ERROR
);
...
...
@@ -660,7 +660,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
}
// Open the column file
column_file_descriptor
=
openat
(
column_directory
->
dir_fd
,
column_file_name
,
O_RDWR
|
O_CREAT
,
0777
);
column_file_descriptor
=
openat
(
column_directory
->
dir_fd
,
column_file_name
,
O_RDWR
|
O_CREAT
|
O_EXCL
,
0777
);
if
(
column_file_descriptor
<
0
)
{
obi_set_errno
(
OBICOL_UNKNOWN_ERROR
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment