diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-06 14:30:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-06 14:31:04 +0200 |
commit | 4d495cfd014687fa68b17643407f3c64eb890b4f (patch) | |
tree | 716b23b297e76e2e78a39d649be9b0f79fa825d6 /cpukit/libfs/src/dosfs | |
parent | a2c204ebf88d2d529ab9989b23f03e20ff2a7b33 (diff) |
dosfs: Fix fat_file_update()
Do not update the non-existant meta-data of the root directory.
Update #2944.
Diffstat (limited to 'cpukit/libfs/src/dosfs')
-rw-r--r-- | cpukit/libfs/src/dosfs/fat_file.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c index c65c758214..e7f593ec1f 100644 --- a/cpukit/libfs/src/dosfs/fat_file.c +++ b/cpukit/libfs/src/dosfs/fat_file.c @@ -168,11 +168,9 @@ fat_file_update(fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd) { int ret_rc = RC_OK; - /* - * if fat-file descriptor is not marked as "removed", synchronize - * size, first cluster number, write time and date fields of the file - */ - if (!FAT_FILE_IS_REMOVED(fat_fd) && FAT_FILE_HAS_META_DATA_CHANGED(fat_fd)) + if (!FAT_FILE_IS_REMOVED(fat_fd) && + FAT_FILE_HAS_META_DATA_CHANGED(fat_fd) && + !FAT_FD_OF_ROOT_DIR(fat_fd)) { int rc; |