diff options
author | David Robillard <d@drobilla.net> | 2006-06-13 07:27:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-13 07:27:52 +0000 |
commit | 868f557f2612903f72614a2b3a317c7a528188d1 (patch) | |
tree | 979151d7bbb25fb633adb662d386ef4df0d46158 /libs/ardour/utils.cc | |
parent | edc7a146f5f3c9facd97b3e8951e1607b5e9ec31 (diff) |
Merged with trunk (painfully)
git-svn-id: svn://localhost/ardour2/branches/midi@581 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r-- | libs/ardour/utils.cc | 9 |
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; } |