#include "error.h"
#include "dirname.h"
#include "path-concat.h"
+#include "quote.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "cp"
new->is_new_dir = 1;
if (mkdir (dirpath, mode))
{
- error (0, errno, _("cannot make directory `%s'"), dirpath);
+ error (0, errno, _("cannot make directory %s"),
+ quote (dirpath));
return 1;
}
else
}
else if (!S_ISDIR (stats.st_mode))
{
- error (0, 0, _("`%s' exists but is not a directory"), dirpath);
+ error (0, 0, _("%s exists but is not a directory"),
+ quote (dirpath));
return 1;
}
else
else if (!S_ISDIR (stats.st_mode))
{
- error (0, 0, _("`%s' exists but is not a directory"), dst_dirname);
+ error (0, 0, _("%s exists but is not a directory"), quote (dst_dirname));
return 1;
}
else
{
if (target_directory)
{
- error (0, 0, _("specified target, `%s' is not a directory"), dest);
+ error (0, 0, _("specified target, %s is not a directory"),
+ quote (dest));
usage (1);
}
if (n_files > 1)
{
error (0, 0,
- _("copying multiple files, but last argument (%s) is not a directory"),
- dest);
+ _("copying multiple files, but last argument %s is not a directory"),
+ quote (dest));
usage (1);
}
}