forked from rojo-rbx/rojo
Correct issue with default.project.json files with no name being named default after change (#917)
Co-authored-by: Kenneth Loeffler <kenloef@gmail.com>
This commit is contained in:
@@ -22,9 +22,12 @@ pub fn snapshot_project(
|
||||
path: &Path,
|
||||
name: &str,
|
||||
) -> anyhow::Result<Option<InstanceSnapshot>> {
|
||||
let project = Project::load_from_slice(&vfs.read(path)?, path)
|
||||
let project = Project::load_exact(vfs, path, Some(name))
|
||||
.with_context(|| format!("File was not a valid Rojo project: {}", path.display()))?;
|
||||
let project_name = project.name.as_deref().unwrap_or(name);
|
||||
let project_name = match project.name.as_deref() {
|
||||
Some(name) => name,
|
||||
None => panic!("Project is missing a name"),
|
||||
};
|
||||
|
||||
let mut context = context.clone();
|
||||
context.clear_sync_rules();
|
||||
|
||||
Reference in New Issue
Block a user