Index: sd-reader_config.h
===================================================================
--- sd-reader_config.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ sd-reader_config.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: partition_config.h
===================================================================
--- partition_config.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ partition_config.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: ChangeLog
===================================================================
--- ChangeLog	(.../sd-reader_release_20061101)	(Revision 106)
+++ ChangeLog	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,4 +1,9 @@
 
+2007-01-20 sd-reader
+	* fix directory creation
+	  - correctly create "." and ".." directory entries (8.3 <-> lfn versions)
+	  - correctly clear cluster containing the directory entries for new directory
+
 2006-11-01 sd-reader
 	* Implement creation and deletion of directories.
 	* Clear the directory entries of new directory clusters.
Index: sd_raw_config.h
===================================================================
--- sd_raw_config.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ sd_raw_config.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: partition.c
===================================================================
--- partition.c	(.../sd-reader_release_20061101)	(Revision 106)
+++ partition.c	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: uart.c
===================================================================
--- uart.c	(.../sd-reader_release_20061101)	(Revision 106)
+++ uart.c	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: fat16_config.h
===================================================================
--- fat16_config.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ fat16_config.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: partition.h
===================================================================
--- partition.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ partition.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: sd_raw.c
===================================================================
--- sd_raw.c	(.../sd-reader_release_20061101)	(Revision 106)
+++ sd_raw.c	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: uart.h
===================================================================
--- uart.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ uart.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: fat16.c
===================================================================
--- fat16.c	(.../sd-reader_release_20061101)	(Revision 106)
+++ fat16.c	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/* 
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
@@ -1665,10 +1668,8 @@
     /* generate 8.3 file name */
     memset(&buffer[0], ' ', 11);
     char* name_ext = strrchr(dir_entry->long_name, '.');
-    if(name_ext)
+    if(name_ext && *++name_ext)
     {
-        ++name_ext;
-        
         uint8_t name_ext_len = strlen(name_ext);
         name_len -= name_ext_len + 1;
 
@@ -1933,7 +1934,7 @@
         return 0;
 
     /* clear cluster to prevent bogus directory entries */
-    fat16_clear_cluster(fs, dir_entry->cluster);
+    fat16_clear_cluster(fs, dir_cluster);
     
     memset(dir_entry, 0, sizeof(*dir_entry));
     dir_entry->attributes = FAT16_ATTRIB_DIR;
Index: sd_raw.h
===================================================================
--- sd_raw.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ sd_raw.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
Index: main.c
===================================================================
--- main.c	(.../sd-reader_release_20061101)	(Revision 106)
+++ main.c	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
@@ -75,7 +78,7 @@
  *
  * \htmlonly
  * <p>
- * The following table shows some typical code sizes in bytes, using malloc()/free():
+ * The following table shows some typical code sizes in bytes, using the 20061101 release with malloc()/free():
  * </p>
  *
  * <table border="1" cellpadding="2">
@@ -175,7 +178,7 @@
  * I adapted his work for my circuit. Although this is a very simple
  * solution, I had no problems using it.
  * 
- * \section copyright Copyright 2006 by Roland Riegel
+ * \section copyright Copyright 2006-2007 by Roland Riegel
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation (http://www.gnu.org/copyleft/gpl.html).
Index: fat16.h
===================================================================
--- fat16.h	(.../sd-reader_release_20061101)	(Revision 106)
+++ fat16.h	(.../sd-reader_release_20070120)	(Revision 106)
@@ -1,5 +1,8 @@
 
-/* This program is free software; you can redistribute it and/or modify
+/*
+ * Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
