~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to src/mv.c

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* mv -- move or rename files
2
 
   Copyright (C) 1986-2012 Free Software Foundation, Inc.
 
2
   Copyright (C) 1986-2013 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
151
151
  int err = (stat (file, &st) == 0 ? 0 : errno);
152
152
  bool is_a_dir = !err && S_ISDIR (st.st_mode);
153
153
  if (err && err != ENOENT)
154
 
    error (EXIT_FAILURE, err, _("accessing %s"), quote (file));
 
154
    error (EXIT_FAILURE, err, _("failed to access %s"), quote (file));
155
155
  return is_a_dir;
156
156
}
157
157
 
291
291
              program_name, program_name, program_name);
292
292
      fputs (_("\
293
293
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\
294
 
\n\
295
 
"), stdout);
296
 
      fputs (_("\
297
 
Mandatory arguments to long options are mandatory for short options too.\n\
298
 
"), stdout);
 
294
"), stdout);
 
295
 
 
296
      emit_mandatory_arg_note ();
 
297
 
299
298
      fputs (_("\
300
299
      --backup[=CONTROL]       make a backup of each existing destination file\
301
300
\n\
398
397
            {
399
398
              struct stat st;
400
399
              if (stat (optarg, &st) != 0)
401
 
                error (EXIT_FAILURE, errno, _("accessing %s"), quote (optarg));
 
400
                error (EXIT_FAILURE, errno, _("failed to access %s"),
 
401
                       quote (optarg));
402
402
              if (! S_ISDIR (st.st_mode))
403
403
                error (EXIT_FAILURE, 0, _("target %s is not a directory"),
404
404
                       quote (optarg));