diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2019-07-15 18:46:59 -0700 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2019-08-10 16:50:18 -0700 |
commit | 3c83737fa488281f20030b5b36d7e1d4ba4313c9 (patch) | |
tree | 058ab8e18ff6bacdcf4a2551bf8845b447bab88a /modules/network | |
parent | 0133e9fba615d8b5b1c67976a1da702977dd74a3 (diff) |
Always pulse status bar while spawning processes synchronously
Diffstat (limited to 'modules/network')
-rw-r--r-- | modules/network/samba.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/network/samba.c b/modules/network/samba.c index 7e8dc46c..5df28010 100644 --- a/modules/network/samba.c +++ b/modules/network/samba.c @@ -57,7 +57,7 @@ scan_samba_usershares(void) gchar *usershare, *cmdline; gsize length; - spawned = g_spawn_command_line_sync("net usershare list", + spawned = hardinfo_spawn_command_line_sync("net usershare list", &out, &err, &status, NULL); if (spawned && status == 0 && out != NULL) { @@ -66,7 +66,7 @@ scan_samba_usershares(void) while(next_nl = strchr(p, '\n')) { cmdline = g_strdup_printf("net usershare info '%s'", strend(p, '\n')); - if (g_spawn_command_line_sync(cmdline, + if (hardinfo_spawn_command_line_sync(cmdline, &usershare, NULL, NULL, NULL)) { length = strlen(usershare); scan_samba_from_string(usershare, length); @@ -74,7 +74,6 @@ scan_samba_usershares(void) } g_free(cmdline); - shell_status_pulse(); p = next_nl + 1; } g_free(out); @@ -105,8 +104,6 @@ scan_samba_from_string(gchar *str, gsize length) groups = g_key_file_get_groups(keyfile, NULL); while (groups[i]) { - shell_status_pulse(); - if (g_key_file_has_key(keyfile, groups[i], "path", NULL)) { gchar *path = g_key_file_get_string(keyfile, groups[i], "path", NULL); smb_shares_list = h_strdup_cprintf("%s=%s\n", |