1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-01-31 02:01:01 +00:00

fix file drag & drop by replacing /cygdrive to /mnt

This commit is contained in:
Chuanren Wu 2016-10-09 02:17:05 +02:00
parent a6d96ff1a2
commit 5340213c16
2 changed files with 20 additions and 0 deletions

View File

@ -35,6 +35,7 @@ mintty:
$(wget) https://github.com/mintty/mintty/archive/master.zip
mv master.zip mintty-master.zip
unzip -o mintty-master.zip
cd mintty-master; patch -p0 -i ../mintty_drag_drop_file.patch
cd mintty-master/src; make LDFLAGS="-static -static-libgcc -s"
mkdir -p bin
cp mintty-master/bin/mintty.exe bin/

View File

@ -0,0 +1,19 @@
--- src/charset.h.orig 2016-10-07 16:12:34.000000000 +0200
+++ src/charset.h 2016-10-09 02:04:58.517284900 +0200
@@ -79,7 +79,15 @@ extern bool widerange(xchar c);
static inline char *
path_win_w_to_posix(const wchar * wp)
-{ return cygwin_create_path(CCP_WIN_W_TO_POSIX, wp); }
+{
+ char *p;
+ p = cygwin_create_path(CCP_WIN_W_TO_POSIX, wp);
+ if (strncmp("/cygdrive/", p, 10) == 0) {
+ strncpy(p, "/mnt/", 5);
+ strcpy(p+5, p+10);
+ }
+ return p;
+}
static inline wchar *
path_posix_to_win_w(const char * p)