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

Weird behaviour of Save as... #3678

Closed
H0R5E opened this issue Nov 11, 2016 · 5 comments
Closed

Weird behaviour of Save as... #3678

H0R5E opened this issue Nov 11, 2016 · 5 comments

Comments

@H0R5E
Copy link

H0R5E commented Nov 11, 2016

Description of your problem

The functionality of Save as... is obscured by an unnecessary dialog which can lead to all unsaved work being lost.

What steps will reproduce the problem?

  1. Open an existing file
  2. Select File -> Save as...
  3. Enter a new file path [new file name]
  4. Click Save

What is the expected output? What do you see instead?

I would expect the file to be saved under the new path and for the editor to show the new file and close the old file.

Instead a dialog pop up with the weird behaviour. It says:

"""
[new file name] is unavailable (blah blah blah)
Do you want to close it?
"""

If you answer yes, the original file closes and the new file is not created - ALL UNSAVED WORK IS LOST
If you answer no, the expected outcome (without the dialog) occurs.

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.0.1
  • Python Version: 2.7.12 64 bits
  • Operating system: Windows

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.3 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.3.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.4.6 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12
Copy link
Member

@dalthviz, please take a look at this one.

@H0R5E
Copy link
Author

H0R5E commented Nov 11, 2016

Thanks for the response. There is also different weird behaviour when you try to overwrite an existing file with Save as...

If you would you like me to document that here or start another bug, please let me know.

@goanpeca
Copy link
Member

Yes please document here :-)

@H0R5E
Copy link
Author

H0R5E commented Nov 11, 2016

Description of your problem

Save as... will not overwrite an existing file if no modifications are made to the original file

What steps will reproduce the problem?

  1. Open an existing file
  2. DO NOT modify the file
  3. Select File -> Save as...
  4. Enter a different path to an existing file
  5. Click Save
  6. Answer "Yes" to Confirm Save As dialog

What is the expected output? What do you see instead?

I would expect the source file to be saved under the path of the existing target file (i.e. replacing that files contents) and for the target file to be loaded in the editor and the source file to be closed.

Instead the target file is just opened in the editor and the source file is closed. The target file is not overwritten, when it should be, and the target files unaltered contents are displayed.

EDIT: Just finessing the semantics

@H0R5E
Copy link
Author

H0R5E commented Nov 11, 2016

Description of your problem

Save as... opens a different unnecessary dialog when overwriting an existing file following modifications to the source file. This can lead to loss of unsaved work.

What steps will reproduce the problem?

  1. Open an existing file
  2. DO modify the file
  3. Select File -> Save as...
  4. Enter a different path to an existing file [target file path]
  5. Click Save
  6. Answer "Yes" to Confirm Save As dialog

What is the expected output? What do you see instead?

I would expect the source file to be saved under the path of the existing target file (i.e. replacing that files contents) and for the target file to be loaded in the editor and the source file to be closed.

Instead another dialog appears that says:

"""
[target file path] has been modified outside of Spyder.
Do you want to reload it and lose all your changes?
"""

If you answer yes, the source file closes and the target file is opened - ALL UNSAVED WORK IS LOST
If you answer no, the expected outcome (without the dialog) occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants