forked from cromer/pamac-classic
Use GLib.File instead of cp
This commit is contained in:
parent
11e1ba2564
commit
7a9a241181
@ -1404,7 +1404,9 @@ namespace Pamac {
|
|||||||
if (path != "" && !(path in built_pkgs)) {
|
if (path != "" && !(path in built_pkgs)) {
|
||||||
built_pkgs += path;
|
built_pkgs += path;
|
||||||
if(aur_keep_pkgs) {
|
if(aur_keep_pkgs) {
|
||||||
yield spawn_in_term ({"cp", path, aur_move_dir});
|
File pkg_file = GLib.File.new_for_path (path);
|
||||||
|
File target_file = GLib.File.new_build_filename (aur_move_dir, pkg_file.get_basename());
|
||||||
|
pkg_file.copy (target_file, OVERWRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1412,6 +1414,9 @@ namespace Pamac {
|
|||||||
} catch (SpawnError e) {
|
} catch (SpawnError e) {
|
||||||
stderr.printf ("SpawnError: %s\n", e.message);
|
stderr.printf ("SpawnError: %s\n", e.message);
|
||||||
status = 1;
|
status = 1;
|
||||||
|
} catch (GLib.Error e) {
|
||||||
|
stderr.printf ("GLib Error: %s\n", e.message);
|
||||||
|
status = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user