Remove dot at the end of filename without extension
[reactos.git] / reactos / drivers / fs / cdfs / misc.c
index a905627..49f2741 100644 (file)
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
+#include "cdfs.h"
 
 #define NDEBUG
 #include <debug.h>
 
-#include "cdfs.h"
-
-
 /* FUNCTIONS ****************************************************************/
 
 VOID
@@ -53,6 +50,11 @@ CdfsSwapString(PWCHAR Out,
       if (t[i+1] == 0 && t[i] == ';')
        break;
     }
+  if ((i>2)&&(t[i-2] == '.'))
+  {
+    t[i-2] = 0;
+    t[i-1] = 0;
+  }
   t[i] = 0;
   t[i+1] = 0;
 }