Browse Source

Fix open bug

Bill Greiman 4 years ago
parent
commit
7d0261d144
2 changed files with 2 additions and 2 deletions
  1. 1 1
      library.properties
  2. 1 1
      src/FatLib/FatFileLFN.cpp

+ 1 - 1
library.properties

@@ -1,5 +1,5 @@
 name=SdFat
-version=1.1.3
+version=1.1.4
 license=MIT
 author=Bill Greiman <fat16lib@sbcglobal.net>
 maintainer=Bill Greiman <fat16lib@sbcglobal.net>

+ 1 - 1
src/FatLib/FatFileLFN.cpp

@@ -303,7 +303,7 @@ bool FatFile::open(FatFile* dirFile, fname_t* fname, oflag_t oflag) {
   ldir_t* ldir;
   size_t len = fname->len;
 
-  if (!dirFile || dirFile->isDir() || isOpen()) {
+  if (!dirFile || !dirFile->isDir() || isOpen()) {
     DBG_FAIL_MACRO;
     goto fail;
   }