CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 08/01/30 16:07:50
Modified files: . : ChangeLog gui : Player.cpp Log message: Use the pseudo root url (-u) for appending to the locale sandboxes. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5525&r2=1.5526 http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.78&r2=1.79 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5525 retrieving revision 1.5526 diff -u -b -r1.5525 -r1.5526 --- ChangeLog 30 Jan 2008 14:51:47 -0000 1.5525 +++ ChangeLog 30 Jan 2008 16:07:49 -0000 1.5526 @@ -1,5 +1,12 @@ 2008-01-30 Sandro Santilli <[EMAIL PROTECTED]> + * gui/Player.cpp (load_movie): use the pseudo root url + for appending to the locale sendboxes. Fixes running + multi-file applications from the filesystem in the + plugin (or generally, loading first movie from stdin). + +2008-01-30 Sandro Santilli <[EMAIL PROTECTED]> + * gui/Player.{cpp,h}: add a setHostFD method. * server/movie_root.{cpp,h}: add hostFD getter and setter. * server/vm/ASHandlers.cpp (CommonGetUrl): use host fd Index: gui/Player.cpp =================================================================== RCS file: /sources/gnash/gnash/gui/Player.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -u -b -r1.78 -r1.79 --- gui/Player.cpp 30 Jan 2008 14:51:47 -0000 1.78 +++ gui/Player.cpp 30 Jan 2008 16:07:49 -0000 1.79 @@ -209,6 +209,18 @@ { gnash::movie_definition* md=NULL; + RcInitFile& rcfile = RcInitFile::getDefaultInstance(); + URL vurl(_url); + //cout << "URL is " << vurl.str() << " (" << _url << ")" << endl; + if ( vurl.protocol() == "file" ) + { + const std::string& path = vurl.path(); + size_t lastSlash = path.find_last_of('/'); + std::string dir = path.substr(0, lastSlash+1); + rcfile.addLocalSandboxPath(dir); + log_debug(_("%s appended to local sandboxes"), dir.c_str()); + } + try { if ( _infile == "-" ) { @@ -219,25 +231,6 @@ { URL url(_infile); - // If the movie is loaded from the filesystem we need - // to grant access to it - if ( url.protocol() == "file" ) - { - RcInitFile& rcfile = RcInitFile::getDefaultInstance(); - - const std::string& path = url.path(); - -#if 1 // add the *directory* the movie was loaded from to the local sandbox path - size_t lastSlash = path.find_last_of('/'); - std::string dir = path.substr(0, lastSlash+1); - rcfile.addLocalSandboxPath(dir); - log_debug(_("%s appended to local sandboxes"), dir.c_str()); -#else // add the *file* to be loaded to the local sandbox path - rcfile.addLocalSandboxPath(path); - log_debug(_("%s appended to local sandboxes"), url.path().c_str()); -#endif - } - // _url should be always set at this point... md = gnash::create_library_movie(url, _url.c_str(), false); } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit