fix: FAT32 >1024 byte read/write truncation, VFS write notifications & dir watch
- FAT32 writeFile: replace hardcoded spc=4 with bootRecord^.spc for cluster allocation and per-sector write loop - FAT32 writeFile: update directory entry byteSize on disk after write - FAT32 readFile: use dir^.byteSize instead of cluster-based estimate, fix off-by-one in read loop, remove spurious +sectorSize allocation - VFS: fire VFS_OnMutation on sync/async writes (cache invalidate + watch) - VFS: invalidate all cache entries for volume on mutation (relPath mismatch) - VFS: add vfsParentDir helper, store VFSDir in file descriptors - FDTable: add VFSDir field, free on close - File browser: enable directory watch & poll timer, two-step new file creation (open + write), remove io.syslog import - Linker: add --no-warn-execstack to suppress ld exit code 1 on warning - Add core.strings.helpers unit (getFileExtension, fmtFileSize, sort)
This commit is contained in:
1 parent
8755f108f2
commit
671c144ad5
6 files changed
+403
-40
No files matched your search
@@ -40,6 +40,7 @@ type
|
||||
Volume : PStorage_Volume;
|
||||
Directory : pchar; { directory path within the volume }
|
||||
FileName : pchar; { filename within that directory }
|
||||
VFSDir : pchar; { full VFS parent directory path, e.g. '/sys' }
|
||||
OpenMode : uint8; { TOpenMode ordinal — avoids VFS type dependency }
|
||||
DataBuffer : puint32; { pre-loaded data for small files, nil otherwise }
|
||||
DataSize : uint32; { size of pre-loaded data in bytes }
|
||||
@@ -109,6 +110,10 @@ begin
|
||||
kfree(void(entry^.FileName));
|
||||
entry^.FileName := nil;
|
||||
end;
|
||||
if entry^.VFSDir <> nil then begin
|
||||
kfree(void(entry^.VFSDir));
|
||||
entry^.VFSDir := nil;
|
||||
end;
|
||||
|
||||
entry^.InUse := false;
|
||||
entry^.Loaded := false;
|
||||
|
||||
Reference in new issue
Block a user