From c3d9cb2b224ed20e074888e9ac89573788cf5aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 13 Mar 2012 11:36:15 +0000 Subject: [PATCH] tests: fix weird windowsy code in save_and_load unit test Fixes compiler error about FILENAME_MAX in 0.11 --- tests/check/ges/save_and_load.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/check/ges/save_and_load.c b/tests/check/ges/save_and_load.c index c13f0ea629..a53549c4e6 100644 --- a/tests/check/ges/save_and_load.c +++ b/tests/check/ges/save_and_load.c @@ -638,9 +638,7 @@ GST_START_TEST (test_pitivi_file_load) GESFormatter *formatter; GESTimeline *timeline, *expected; GMainLoop *mainloop; - char cCurrentPath[FILENAME_MAX]; - char *a; - gchar *uri, *save_uri; + gchar *uri, *save_uri, *cur_dir; /*create the expected timeline */ timeline = ges_timeline_new (); @@ -649,9 +647,11 @@ GST_START_TEST (test_pitivi_file_load) /* create the timeline from formatter */ formatter = GES_FORMATTER (ges_pitivi_formatter_new ()); - a = GetCurrentDir (cCurrentPath, sizeof (cCurrentPath)); - uri = g_strconcat (a, "/test.xptv", NULL); - save_uri = g_strconcat (a, "/testsave.xptv", NULL); + cur_dir = g_get_current_dir (); + uri = g_build_filename (cur_dir, "test.xptv", NULL); + save_uri = g_build_filename (cur_dir, "testsave.xptv", NULL); + g_free (cur_dir); + if (g_file_test (uri, G_FILE_TEST_EXISTS) == FALSE) { GST_ERROR ("Could not test GESPitiviFormatter as no project file found"); return;