summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 8e9a36de59..15d0c6be81 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -175,10 +175,13 @@ tokenize_fullpath (string fullpath, string& path, string& name)
}
int
-touch_file(string path)
+touch_file (string path)
{
- FILE* file = fopen(path.c_str(), "a");
- fclose(file);
+ int fd = open (path.c_str(), O_RDONLY|O_CREAT);
+ if (fd >= 0) {
+ close (fd);
+ return 0;
+ }
return 1;
}