freemyipod r635 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r634‎ | r635 | r636 >
Date:20:54, 20 February 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Prevent directories from being opened like files
Modified paths:
  • /emcore/trunk/file.c (modified) (history)

Diff [purge]

Index: emcore/trunk/file.c
@@ -159,7 +159,7 @@
160160 return -7;
161161 }
162162 } else {
163 - if(file->write && (file->attr & FAT_ATTR_DIRECTORY)) {
 163+ if(file->attr & FAT_ATTR_DIRECTORY) {
164164 errno = EISDIR;
165165 free(file);
166166 closedir(dir);