aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-01 11:30:42 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-11-02 14:06:21 +0000
commit8eb17b56985cd5aea70ab5947585615b08da6151 (patch)
treedd505754df44316d5ffe6ce7385958732b9b400f /win
parentb5d5717baa264897425a4bdd8f64ac393756f64a (diff)
downloadsyslinux-8eb17b56985cd5aea70ab5947585615b08da6151.tar.gz
syslinux-8eb17b56985cd5aea70ab5947585615b08da6151.tar.xz
syslinux-8eb17b56985cd5aea70ab5947585615b08da6151.zip
win: Print error message if we fail to install to --directory
Instead of silently returning with no indication of error if we couldn't install to the --directory argument, print an error message that tells the user the files are not where they wanted. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'win')
-rw-r--r--win/syslinux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/win/syslinux.c b/win/syslinux.c
index 64369d5c..c291f005 100644
--- a/win/syslinux.c
+++ b/win/syslinux.c
@@ -272,11 +272,15 @@ static void move_file(char *pathname, char *filename)
/* Delete any previous file */
SetFileAttributes(new_name, FILE_ATTRIBUTE_NORMAL);
DeleteFile(new_name);
- if (!MoveFile(pathname, new_name))
+ if (!MoveFile(pathname, new_name)) {
+ fprintf(stderr,
+ "Failed to move %s to destination directory: %s\n",
+ filename, opt.directory);
+
SetFileAttributes(pathname, FILE_ATTRIBUTE_READONLY |
FILE_ATTRIBUTE_SYSTEM |
FILE_ATTRIBUTE_HIDDEN);
- else
+ } else
SetFileAttributes(new_name, FILE_ATTRIBUTE_READONLY |
FILE_ATTRIBUTE_SYSTEM |
FILE_ATTRIBUTE_HIDDEN);