# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1342105122 14400 # Node ID a82fcd612c8f694cb74c5db5ed4d0e71f0bff588 # Parent 7371e127c351229ef16c512a45462161af6159ae pkg.m: Check if the prefix directory can be created; don't fail silently diff --git a/scripts/pkg/pkg.m b/scripts/pkg/pkg.m --- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -424,7 +424,10 @@ try prefix = absolute_pathname (prefix); catch - mkdir (prefix); + [status, msg, msgid] = mkdir (prefix); + if (status == 0) + error("cannot create prefix %s: %s", prefix, msg); + endif warning ("creating the directory %s\n", prefix); prefix = absolute_pathname (prefix); end_try_catch @@ -436,7 +439,10 @@ try archprefix = absolute_pathname (archprefix); catch - mkdir (archprefix); + [status, msg, msgid] = mkdir (archprefix); + if (status == 0) + error("cannot create prefix %s: %s", prefix, msg); + endif warning ("creating the directory %s\n", archprefix); archprefix = absolute_pathname (archprefix); end_try_catch