aboutsummaryrefslogtreecommitdiffstats
path: root/android/utils
diff options
context:
space:
mode:
Diffstat (limited to 'android/utils')
-rw-r--r--android/utils/path.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/android/utils/path.c b/android/utils/path.c
index b15b6de..e7ef2b0 100644
--- a/android/utils/path.c
+++ b/android/utils/path.c
@@ -34,7 +34,8 @@
#include <signal.h>
#endif
-#define D(...) ((void)0)
+#include "android/utils/debug.h"
+#define D(...) VERBOSE_PRINT(init,__VA_ARGS__)
#ifndef CHECKED
# ifdef _WIN32
@@ -457,6 +458,12 @@ path_copy_file( const char* dest, const char* source )
return -1;
}
+ if ( access(source, R_OK) < 0 ) {
+ D("%s: source file is un-readable: %s\n",
+ __FUNCTION__, source);
+ return -1;
+ }
+
#ifdef _WIN32
fd = _open(dest, _O_RDWR | _O_BINARY);
fs = _open(source, _O_RDONLY | _O_BINARY);