aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorJuanma Barranquero2009-03-11 00:57:03 +0000
committerJuanma Barranquero2009-03-11 00:57:03 +0000
commit6cde1b21385d450f73b889deee4e11211b0036ec (patch)
tree7cff2a3426091145f2c6d8e2b5a476b2fe1ca003 /lib-src
parent7679cfc8a436185e2ad95c7f6a900d1431714434 (diff)
downloademacs-6cde1b21385d450f73b889deee4e11211b0036ec.tar.gz
emacs-6cde1b21385d450f73b889deee4e11211b0036ec.zip
* emacsclient.c (main): Revert part of last change,
so drive-relative file names again work on Windows.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/emacsclient.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 0609f1e1e10..c9c37ed76ff 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,10 @@
12009-03-10 Stefan Monnier <monnier@iro.umontreal.ca> 12009-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacsclient.c (main): Revert part of last change, so
4 drive-relative file names again work on Windows.
5
62009-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
7
3 * emacsclient.c (main): Always pass cwd via "-dir". Pass the file 8 * emacsclient.c (main): Always pass cwd via "-dir". Pass the file
4 names without prepending cwd to them, so Emacs uses its customary 9 names without prepending cwd to them, so Emacs uses its customary
5 rules to determine how to interpret the file name. 10 rules to determine how to interpret the file name.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 3197b2a7276..f66d6b4cd25 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1635,6 +1635,26 @@ main (argc, argv)
1635 continue; 1635 continue;
1636 } 1636 }
1637 } 1637 }
1638#ifdef WINDOWSNT
1639 else if (! file_name_absolute_p (argv[i])
1640 && (isalpha (argv[i][0]) && argv[i][1] == ':'))
1641 /* Windows can have a different default directory for each
1642 drive, so the cwd passed via "-dir" is not sufficient
1643 to account for that.
1644 If the user uses <drive>:<relpath>, we hence need to be
1645 careful to expand <relpath> with the default directory
1646 corresponding to <drive>. */
1647 {
1648 char *filename = (char *) xmalloc (MAX_PATH);
1649 DWORD size;
1650
1651 size = GetFullPathName (argv[i], MAX_PATH, filename, NULL);
1652 if (size > 0 && size < MAX_PATH)
1653 argv[i] = filename;
1654 else
1655 free (filename);
1656 }
1657#endif
1638 1658
1639 send_to_emacs (emacs_socket, "-file "); 1659 send_to_emacs (emacs_socket, "-file ");
1640 quote_argument (emacs_socket, argv[i]); 1660 quote_argument (emacs_socket, argv[i]);