Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File extension defaulting to txt on macOS 15 #1761

Open
AntoineGautier opened this issue Nov 18, 2024 · 3 comments
Open

File extension defaulting to txt on macOS 15 #1761

AntoineGautier opened this issue Nov 18, 2024 · 3 comments
Assignees
Labels
bug somethings work not correctly  matter issues caused by bugs by Apple

Comments

@AntoineGautier
Copy link

Description

Follow-up on closed issue: #1396
When saving a file without any extension, .txt is automatically appended. There appears to be no option to disable this behavior.
The file format does not appear to influence this behavior. For instance, saving a Dockerfile as "Dockerfile" even when the file format is set to "Dockerfile" in CotEditor results in the file being saved as "Dockerfile.txt".
In contrast, TextEdit offers a toggle to disable the automatic addition of the ".txt" extension on save. Would it be possible to implement a similar logic in CotEditor?

image

To Reproduce

  1. Go to 'File'
  2. Click on 'Save'
  3. Enter a name without any extension under 'Save As': for example Untitled
  4. See that the file is saved as Untitled.txt

Expected behavior

No response

CotEditor version

5.0.4

macOS version

15.1 (24B83)

Additional context

No response

@AntoineGautier AntoineGautier added the potential bug issues not yet confirmed by maintainers label Nov 18, 2024
@1024jp 1024jp added better to fix unwanted behaviors not critical but better to fix and removed potential bug issues not yet confirmed by maintainers labels Nov 22, 2024
@1024jp 1024jp self-assigned this Nov 22, 2024
@1024jp 1024jp added bug somethings work not correctly and removed better to fix unwanted behaviors not critical but better to fix labels Nov 22, 2024
@1024jp
Copy link
Member

1024jp commented Nov 22, 2024

Thank you for the report.
It seems to occur only on macOS 15 (or any other specific conditions) since CotEditor 5.0.5 correctly adds a filename extension on macOS 14 in my environment.
Thus, this can be either a bug on macOS 15, the behavior internally changed in macOS 15, or there is some other hidden condition triggering this issue.
Let me have some more time to investigate.

@1024jp 1024jp added the  matter issues caused by bugs by Apple label Feb 26, 2025
@1024jp 1024jp changed the title File extension defaulting to txt File extension defaulting to txt on macOS 15 Feb 26, 2025
@1024jp
Copy link
Member

1024jp commented Mar 5, 2025

I recently investigated this issue again and conclude that this is due to a change on the part of the framework provided by Apple on macOS 15.
This is like an omission in the implementation of the save panel spec change in macOS 15, which is not preferred behavior and should be fixed since the file extension is correctly removed when the user removes it character-by-character.

Unfortunately, it seems there is no way to fix the current behavior by a 3rd party developer.
I'm now writing feedback to Apple so that they can fix it.

@1024jp
Copy link
Member

1024jp commented Mar 14, 2025

Filed FB16863615.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug somethings work not correctly  matter issues caused by bugs by Apple
Development

No branches or pull requests

2 participants