return;
}
- char test_copy[256] = {0, };
- snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path);
-
- ret = system(test_copy);
- if (ret != MEDIA_CONTENT_ERROR_NONE) {
- fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
- fprintf(stderr, "\"%s\" failed (code: %d)\n", test_copy, ret);
- startup_ret = ret;
- return;
+ if (!g_file_test(g_insert_path, G_FILE_TEST_EXISTS)) {
+ char test_copy[256] = {0, };
+ snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path);
+
+ if (system(test_copy) < 0) {
+ fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+ fprintf(stderr, "\"%s\" failed (code: %d)\n", test_copy, ret);
+ startup_ret = -1;
+ return;
+ }
}
-
}