Skip to content

[Bug]: "Save As" does not ask for a new path when a file is already saved #3321

@Nuggets10

Description

@Nuggets10

Describe the bug

Affected script: Simple Python IDE using Tkinter

The save_as() function is supposed to let the user choose a new destination every time it is called. However, when the file has already been saved, the function skips the saving dialog entirely and overwrites the existing file. This makes Save and Save As identical, making the user unable to duplicate or export the file to a different location.

Steps to reproduce the behavior

  1. Open any existing file using File > Open.
  2. Make any change in the IDE.
  3. Click File > Save As.
  4. No dialog appears and the original file is overwritten.

Expected behavior

"Save As" should always open a file explorer dialog that lets the user specify a new file name and path, regardless of whether a file is currently loaded. The original file must remain untouched

Screenshots

No response

Device?

Desktop

Which OS are affected?

Linux

Enter the version of your web browser

No web browser is affected by this bug.

Which browsers are affected?

No response

Additional context

I selected "Linux" as affected OS because I tested the script on Void Linux x86_64, but the issue is the same for the other types of OS.

Record

  • I agree to follow this project's Code of Conduct
  • I'm a GSSoC'23 contributor
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions