[syslinux:elflink] win: Print error message if we fail to install to --directory
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Mon Nov 5 08:03:08 PST 2012
Commit-ID: 8eb17b56985cd5aea70ab5947585615b08da6151
Gitweb: http://www.syslinux.org/commit/8eb17b56985cd5aea70ab5947585615b08da6151
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 1 Nov 2012 11:30:42 +0000
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 2 Nov 2012 14:06:21 +0000
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 at intel.com>
---
win/syslinux.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/win/syslinux.c b/win/syslinux.c
index 64369d5..c291f00 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);
More information about the Syslinux-commits
mailing list