Skip to content

Commit

Permalink
Try to search .pgo files in local directory
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwarthog authored and morevnaproject committed Jun 18, 2016
1 parent 2bbbe30 commit 3576928
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions synfig-core/src/synfig/valuenodes/valuenode_animatedfile.cpp
Expand Up @@ -209,6 +209,7 @@ ValueNode_AnimatedFile::load_file(const String &filename, bool forse)
#endif

String full_filename = CanvasFileNaming::make_full_filename(get_parent_canvas()->get_file_path(), optimized_filename);
String local_filename = CanvasFileNaming::make_local_filename(get_parent_canvas()->get_file_name(), full_filename);
String independent_filename = CanvasFileNaming::make_canvas_independent_filename(get_parent_canvas()->get_file_path(), full_filename);

if (current_filename == independent_filename && !forse) return;
Expand All @@ -225,6 +226,9 @@ ValueNode_AnimatedFile::load_file(const String &filename, bool forse)
&& get_type() == type_string )
{
FileSystem::ReadStream::Handle rs = get_parent_canvas()->get_file_system()->get_read_stream(full_filename);
if (!rs)
FileSystem::ReadStream::Handle rs = get_parent_canvas()->get_file_system()->get_read_stream(local_filename);

map<Time, String> phonemes;
if (!rs)
error("Cannot open .pgo file: %s", full_filename.c_str());
Expand Down

0 comments on commit 3576928

Please sign in to comment.