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

Validate file saved currently allows unsaved files #6

Open
BigRoy opened this issue Jun 26, 2017 · 0 comments
Open

Validate file saved currently allows unsaved files #6

BigRoy opened this issue Jun 26, 2017 · 0 comments

Comments

@BigRoy
Copy link
Contributor

BigRoy commented Jun 26, 2017

Problem

I believe file saved validation is currently incorrect since the merger of #1 from @aardschok.

Specifically when the scene is not saved the collector currently collects a single dot "." because of the path of normalization here:

context.data['currentFile'] = os.path.normpath(current_file)

Because:

import os
os.path.normpath("") == "."
# Result: True # 

As such validation as currently done would pass here:

raise RuntimeError("File not saved")

Solution

Remove the os.path.normpath in the Collector.

@BigRoy BigRoy changed the title Validate file saved Validate file saved currently allows unsaved files Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant