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

A new project in a location with an existing project fails after the wizard #1058

Closed
aaribaud opened this issue May 11, 2022 · 3 comments · Fixed by #1062
Closed

A new project in a location with an existing project fails after the wizard #1058

aaribaud opened this issue May 11, 2022 · 3 comments · Fixed by #1062
Assignees
Labels
enhancement Request: New feature or improvement not a bug Invalid: Feature, not a bug

Comments

@aaribaud
Copy link

Description

  • NovelWriter (justly) rejects the creation of a new project it its location already contains an existing projects.
  • However, this rejection comes after completing the wizard.
  • This means the user was permitted to fill in project details even though these will be lost due to the rejection.
  • Rejection should happen as soon as the document location is known.

Steps to reproduce the behaviour

  • Create a project in a new location
  • Close the project
  • Create a new project at the same location
  • On completion of the wizard, creation is denied because of the location.

What I expected to happen

  • On the second wizard screen, once a location is entered, progress to the next wizard screen should be possible only if location is valid (nonexistent or existent but empty); if progress is not possible, then the reason should be stated below the field for entering the location.

error dialog shown at end of wizard:

A project already exists in that location. Please choose another folder.

@aaribaud aaribaud added the bug Issue: Something isn't working label May 11, 2022
@vkbo
Copy link
Owner

vkbo commented May 11, 2022

This should not even happen because the Wizard will append a folder to the path, matching the chosen project name.

  • Did you try to create a project with the same name as another project?
  • Or, did you manually remove the project name from the path?

It should be fairly easy to add checks for these two scenarios though, which I will do in any case. I was just curious how you reached this issue.

@vkbo vkbo added enhancement Request: New feature or improvement not a bug Invalid: Feature, not a bug and removed bug Issue: Something isn't working labels May 11, 2022
@vkbo vkbo self-assigned this May 11, 2022
@vkbo vkbo added this to the Release 1.7 Beta 1 milestone May 11, 2022
@vkbo vkbo changed the title When creating a project with the same location as an existing one, location is rejected late A new project in a location with an existing project fails after the wizard May 11, 2022
@aaribaud
Copy link
Author

For both creations I chose the same project name and I selected the same "base" folder: /home/$USER/Writings, so for both projects the resulting location was the same /home/$USER/Writings/ProjectName.

Yes, that's an unusual case. TBH, I was trying out the predefined and custom layouts, and I wondered whether/how creating an existing project was handled (rejected? Renamed? Other?) so I actively chose the same project in the same folder each time. :)

@vkbo
Copy link
Owner

vkbo commented May 11, 2022

I can add a check and warning for the case when the folder already exists and isn't empty. It would prevent people from having to go through the Wizard twice to correct the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request: New feature or improvement not a bug Invalid: Feature, not a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants