From c3b035d76139bfadc7c1b95393ad66414a79e628 Mon Sep 17 00:00:00 2001 From: rob Date: Fri, 20 Apr 2007 00:38:09 +0000 Subject: [PATCH] r26116@plastic: rob | 2007-04-20 10:21:30 +1000 cluster 0 in a dir entry means empty file or root dir, depending on the type. make sure we handle this, otherwise we end up with empty half-file-half-dir mutants git-svn-id: https://svn.aros.org:8080/svn/aros/trunk/AROS@25863 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/fs/fat/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbench/fs/fat/lock.c b/workbench/fs/fat/lock.c index bb23b536d..80c0d4156 100644 --- a/workbench/fs/fat/lock.c +++ b/workbench/fs/fat/lock.c @@ -67,7 +67,7 @@ LONG TryLockObj(struct ExtFileLock *fl, UBYTE *name, LONG namelen, LONG access, err = GetDirEntryByPath(&dh, name, namelen, &de); if (err == 0) { - if (FIRST_FILE_CLUSTER(&de) == 0) + if (de.e.entry.attr & ATTR_DIRECTORY && FIRST_FILE_CLUSTER(&de) == 0) err = LockRoot(access, result); else err = LockFile(de.index, dh.ioh.first_cluster, access, result); -- 2.11.4.GIT