Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2669 - Win: Save As can be used to overwrite the existing project without warning
Win: Save As can be used to overwrite the existing project without warning
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
3.0.0
PC Windows 10
: P1 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-18 09:30 UTC by Peter Sampson
Modified: 2021-02-19 15:02 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1) New project 2) File > Save Project > Save Project 3) save it as "my project" 4) File > Save Project > Save Project As 5) Observe: offered name is "my project" (this is fine Microsoft does this) 6) Click the "Save" button 7) Observe: the Save As overwrites the project without warning
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2021-02-19 00:00:00
petersampsonaudacity: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
1-3-10 Save As overwrite warning (2.77 KB, image/png)
2021-02-18 09:30 UTC, Peter Sampson
Details
Backup block message (3.92 KB, image/png)
2021-02-18 18:37 UTC, Peter Sampson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2021-02-18 09:30:52 UTC
Created attachment 1102 [details]
1-3-10 Save As overwrite warning

On Windows, "Save Project As" can be used to overwrite the existing project without warning.

a) this is a regression against 1.3.10
b) Microsoft warns if you try to do this with Word, Excel etc
c) it is inconsistent with macOS (which allows this overwrite, but issues a warning first - see Bug #2666 )
d) it can give the user a false sense of security, thinking they have created a safety copy of the project

This is in stark contrast to the new "Backup Project" command which totally blocks the backup overwriting any existing project name.


A) at the very least we should re-instate the warning that we had in 1.3.10 and earlier (see attachment) and allow the user to OK the overwrite.

B) Better still, in my opinion would be to block the user backing up to the same name as the open project.  We may (but only may) want them to be able to backup to an existing project name (PROVIDED that project is not also open) - as they may be maintaining a single ongoing backup as the project progresses.


To me A) makes little sense as we already have a perfectly good new command for:
i) making backups,
ii) keeping the original project open and active.

So why user Save As when you can just use Save.
Comment 1 Peter Sampson 2021-02-18 09:40:02 UTC
The odd thing about this is that I'm pretty sure I looked at this use case early on in the UP-3.0.0 dev cycle and saw that all was OK then.  

I no longer have access to those alder versions though to confirm this memory.
Comment 2 Leland Lucius 2021-02-18 18:24:57 UTC
Try this:

1) New project
2) Generate chirp
3) Save Project (not Save Project As)
4) Select an existing aup3 project

You should get a confirmation dialog:

   [Window Title]
   Overwrite Project Warning

   [Content]
   Do you want to overwrite the project:
   "C:\Users\Yam\Documents\audacity\0.aup3"?

   If you select "Yes" the project
   "C:\Users\Yam\Documents\audacity\0.aup3"
   will be irreversibly overwritten.

   [Yes] [No]

Is that sort of what you're looking for for Save As?

Now, try this:

1) New project
2) Generate chirp
2) Create a macro with just "Save Project2" that specifies the name of of an existing project
3) Apply the macro to the current project

You should get a dialog that says:

   [Window Title]
   Error Saving Project

   [Content]
   The project was not saved because the file name provided would
   overwrite another project. Please try again and select an original name.

   [OK]

Or is this more like it?

We could do either of those and use the same text so we don't have to worry about new strings.
Comment 3 Peter Sampson 2021-02-18 18:37:22 UTC
Created attachment 1105 [details]
Backup block message

(In reply to Leland Lucius from comment #2)

Either would do as an improvement ...

I like the fact that the second one actually blocks the save rather than allowing it to be Oked through.

But I would prefer the (blocking) message that toy get when you try to Backup Project to an existing project name (see attachment).
Comment 4 Leland Lucius 2021-02-19 01:39:40 UTC
Give this a try:

https://github.com/audacity/audacity/commit/8fce1db

It uses the:

"The project was not saved because the file name provided would overwrite another project. Please try again and select an original name."

because it was already there, just needed to coax it into being used.

I'd recommend testing Timer Record, "Save Project" and "Save Project2" macro commands, and "Save Project" and "Save Project As" menu commands since all of that could be affected by this simple change...unfortunately.
Comment 5 Peter Sampson 2021-02-19 14:56:26 UTC
(In reply to Leland Lucius from comment #4)
Tested on W10 with Audacity 3.0.0 443e417

This now appears to work fine on W10 - tested Save As, Backup and Save - also Timer Record - all seem fine now.

The Save As is nicely blocked, on Windows, from overwriting the existing project file - or any other project file come to that.


The Macolytes will have to look out for themselves in this regard ...
Comment 6 Peter Sampson 2021-02-19 15:02:43 UTC
(In reply to Peter Sampson from comment #5)
>The Macolytes will have to look out for themselves in this regard ...

Actually not true - I tested om macOS 11.2.1 Big Sur with Audacity 3.0.0 443e41

And Mac does also similarly block - it just goes through 2 dialogs to do so
a) the first is a warning that asks if you want to replace - if yo accept, you get
b) the blocking error message