[feat] change download dir to users download dir
This commit is contained in:
@@ -136,7 +136,7 @@ do_client_notify (char *url) {
|
|||||||
gchar *
|
gchar *
|
||||||
getFilePath (const gchar *outputDirectory,
|
getFilePath (const gchar *outputDirectory,
|
||||||
const gchar *outputFilename) {
|
const gchar *outputFilename) {
|
||||||
return g_strdup_printf("%s%s", outputDirectory,
|
return g_strdup_printf("%s/%s", outputDirectory,
|
||||||
g_uri_escape_string(outputFilename, NULL, TRUE));
|
g_uri_escape_string(outputFilename, NULL, TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ int
|
|||||||
do_downloading (const char *originDevice,
|
do_downloading (const char *originDevice,
|
||||||
const char *url,
|
const char *url,
|
||||||
const char *filename) {
|
const char *filename) {
|
||||||
gchar *outputDirectory = "./test_download/";
|
const gchar *outputDirectory = g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);
|
||||||
g_print("Downloading %s to %s\n", url, g_uri_escape_string(filename, NULL, TRUE));
|
g_print("Downloading %s to %s\n", url, g_uri_escape_string(filename, NULL, TRUE));
|
||||||
get (g_strdup(url), originDevice, outputDirectory, filename);
|
get (g_strdup(url), originDevice, outputDirectory, filename);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -166,8 +166,6 @@ teleport_app_activate (GApplication *app) {
|
|||||||
|
|
||||||
create_finished_notification ("USER", 2000, "FILENAME", value);
|
create_finished_notification ("USER", 2000, "FILENAME", value);
|
||||||
*/
|
*/
|
||||||
do_downloading("Julian", "https://sparber.net", "juliansfile.txt");
|
|
||||||
|
|
||||||
run_http_server();
|
run_http_server();
|
||||||
run_avahi_publish_service((char *) g_get_host_name());
|
run_avahi_publish_service((char *) g_get_host_name());
|
||||||
run_avahi_service(peerList);
|
run_avahi_service(peerList);
|
||||||
|
|||||||
Reference in New Issue
Block a user