- // Enables relative paths in a .vik file to work
- gchar *cwd = g_get_current_dir();
- gchar *dir = g_path_get_dirname ( filename );
- if ( dir ) {
- if ( g_chdir ( dir ) ) {
- g_warning ( "Could not change directory to %s", dir );
- }
- g_free (dir);
- }
-
- if ( file_read ( top, f, vp ) )
+ if ( file_read ( top, f, dirpath, vp ) )