 
   onConfirm: (relativePath) ->
     relativePath = relativePath.replace(/\s+$/, '') # Remove trailing whitespace
-    endsWithDirectorySeparator = /\/$/.test(relativePath)
+    endsWithDirectorySeparator = /\/|\\$/.test(relativePath)
     pathToCreate = atom.project.resolve(relativePath)
     return unless pathToCreate
 

    else
      directoryPath = initialPath
    relativeDirectoryPath = atom.project.relativize(directoryPath)
    relativeDirectoryPath += '/' if relativeDirectoryPath.length > 0

    super
      prompt: "Enter the path for the new " + if isCreatingFile then "file." else "folder."

        @showError("'#{pathToCreate}' already exists.")
      else if @isCreatingFile
        if endsWithDirectorySeparator
          @showError("File names must not end with a '#{dirSeparator}' character.")
        else
          fs.writeFileSync(pathToCreate, '')
          atom.project.getRepo()?.getPathStatus(pathToCreate)
