Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

File extension is outputted twice when saving a file created using DocumentManager.createUntitledDocument. #13381

@grafluxe

Description

@grafluxe

Prerequisites

  • Can you reproduce the problem with Debug -> Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

Description

Brackets v1.9.0 added support for creating untitled files with extensions (along with the ability to change language types in untitled files). See Brackets 13086. When using DocumentManager.createUntitledDocument(count, ext);, everything works as expected until you save. The bug is that when you save an untitled file with an extension, the filename outputted into the save-as dialog treats the untitled documents extension as part of its filename and appends the extension again. In other words, the save-as dialogs filename has the extension twice.

Steps to Reproduce

  1. Create an untitled document with an extension using the DocumentManager.
    • To expedite this step, you can use my plugin AnyTemplate (which creates an untitled file with an extension).
  2. Save the file.

Expected behavior: The untitled files name should not include the extension twice.

Actual behavior: The untitled files name includes the extension twice when saving. It outputs like this: Untitled-1.js.js.

Versions

  • OS: macOS Sierra 10.12 (16A323)
  • Brackets: Release 1.9 build 1.9.0-17312 (release 189f6d3)

This issue occurs on both Mac and Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions