[PATCH] allow local repositories on other windows drives (was: Potential issue with svn co file:// with drive letters on Windows machines)
From: Ulrich Winter <ulrich.winter_at_gmx.de>
Date: 2002-05-27 00:31:16 CEST
Joshua,
you should first check, if the path contains a drive letter.
The following patch adds this check and some comments.
Remark:
Ok - IE accepts file://e:/some/dir too, but thats the browser being wrong.
--
Ulrich Winter
Index: ./subversion/libsvn_ra_local/split_url.c
===================================================================
--- ./subversion/libsvn_ra_local/split_url.c
+++ ./subversion/libsvn_ra_local/split_url.c Sun May 26 22:11:16 2002
@@ -60,6 +60,35 @@
(SVN_ERR_RA_ILLEGAL_URL, 0, NULL, pool,
("svn_ra_local__split_URL: URL contains unsupported hostname"));
+ // Handle system specific path components:
+ // According to RFC1738 a file URL has the general form
+ // file://<host>/<path>
+ // On Systems whithout a single logical file system namespace, <path> may
+ // contain special names for drives or volumes, which may be optional,
+ // meaning "the current drive or volume"
+ // The interpretation of these special names is system dependent.
+ //
+ // Examples:
+ // VMS:
+ // DISK$USER:[MY.NOTES]NOTE123456.TXT becomes
+ // file://vms.host.edu/disk$user/my/notes/note12345.txt
+ //
+ // Windows:
+ // e:\some\dir becomes one of:
+ // file://localhost/e:/some/dir (absolute path with drive letter on
specified host)
+ // file:///e:/some/dir (absolute path with drive letter and
without host)
+ // file:///some/dir (absolute path on current drive
without host)
+ // in order to open the repository on WIN32 systems we need the absolute
path in
+ // the following form:
+ // "/some/dir" (implicitly uses the current drive)
+ // "e:/some/dir" (includes specified drive)
+
+#ifdef WIN32
+ if(strchr(path, ':'))
+ path++;
+
+#endif //WIN32
+
/* Duplicate the URL, starting at the top of the path */
url = svn_stringbuf_create ((const char *)path, subpool);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 27 00:30:21 2002
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.