Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/appleseed/renderer/meta/tests/test_projectfilereader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ TEST_SUITE(Renderer_Modeling_Project_ProjectFileReader)
TEST_CASE(ReadValidPackedProject)
{
const char* project = "unit tests/inputs/test_packed_project_valid.appleseedz";
const char* project_unpacked = "unit tests/inputs/test_packed_project_valid.appleseedz.unpacked";
const char* project_unpacked = "unit tests/inputs/test_packed_project_valid.unpacked";

try
{
Expand All @@ -88,9 +88,9 @@ TEST_SUITE(Renderer_Modeling_Project_ProjectFileReader)
reader.read(
project,
"../../../../schemas/project.xsd"); // path relative to input file

EXPECT_NEQ(0, project_success.get());

bf::remove_all(bf::path(project_unpacked));
}
catch (std::exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3181,9 +3181,8 @@ auto_release_ptr<Project> ProjectFileReader::read(
return auto_release_ptr<Project>(0);
}

const bf::path project_path(project_filepath);
const string unpacked_project_directory =
(project_path.parent_path() / project_path.stem()).string() + ".unpacked";
bf::path(project_filepath).replace_extension(".unpacked").string();

RENDERER_LOG_INFO(
"%s appears to be a packed project; unpacking to %s...,",
Expand Down
6 changes: 4 additions & 2 deletions src/appleseed/renderer/modeling/project/projectfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,10 @@ bool ProjectFileWriter::write(
try
{
const bf::path project_path(filepath);
temp_project_filepath = project_path.parent_path() /
"temp.unpacked" / project_path.filename().replace_extension(".appleseed");
temp_project_filepath =
project_path.parent_path() /
project_path.filename().replace_extension(".unpacked") /
project_path.filename().replace_extension(".appleseed");

bf::create_directory(temp_project_filepath.parent_path());

Expand Down