From 54476a21b570f9b6d38d0a500606e2fd5e121001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 12 Jul 2005 16:33:10 +0000 Subject: [PATCH] file_create() now also supports FD relative path specifications. This was the cause for some apps to put their settings files to the current directory, and also that Tracker did not find some icons (from the icons it installed in the MIME database). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13645 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp index e01411aa50..811a657b50 100644 --- a/src/system/kernel/fs/vfs.cpp +++ b/src/system/kernel/fs/vfs.cpp @@ -3041,7 +3041,7 @@ file_create_entry_ref(mount_id mountID, vnode_id directoryID, const char *name, static int -file_create(char *path, int openMode, int perms, bool kernel) +file_create(int fd, char *path, int openMode, int perms, bool kernel) { char name[B_FILE_NAME_LENGTH]; struct vnode *directory; @@ -3050,7 +3050,7 @@ file_create(char *path, int openMode, int perms, bool kernel) FUNCTION(("file_create: path '%s', omode %x, perms %d, kernel %d\n", path, openMode, perms, kernel)); // get directory to put the new file in - status = path_to_dir_vnode(path, &directory, name, kernel); + status = fd_and_path_to_dir_vnode(fd, path, &directory, name, kernel); if (status < 0) return status; @@ -5187,7 +5187,7 @@ _kern_open(int fd, const char *path, int openMode, int perms) return B_NO_MEMORY; if (openMode & O_CREAT) - return file_create(pathBuffer.LockBuffer(), openMode, perms, true); + return file_create(fd, pathBuffer.LockBuffer(), openMode, perms, true); return file_open(fd, pathBuffer.LockBuffer(), openMode, true); } @@ -5965,7 +5965,7 @@ _user_open(int fd, const char *userPath, int openMode, int perms) return status; if (openMode & O_CREAT) - return file_create(path, openMode, perms, false); + return file_create(fd, path, openMode, perms, false); return file_open(fd, path, openMode, false); }