Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/eglib
diff options
context:
space:
mode:
authorBill Holmes <holmes@mono-cvs.ximian.com>2009-01-19 16:57:33 +0300
committerBill Holmes <holmes@mono-cvs.ximian.com>2009-01-19 16:57:33 +0300
commitf0e7628409c0718fb376a24ed818d794223b779d (patch)
treee85d4be3c6779c809ab891027243339ab9949e71 /eglib
parent5e95e86db106bdbe9233d29354d455307ffaebd2 (diff)
2009-01-19 Bill Holmes <billholmes54@gmail.com>
* gmisc-win32.c (g_path_is_absolute): Adding support for UNC paths on Windows. Contributed under MIT/X11 license. svn path=/trunk/mono/; revision=123794
Diffstat (limited to 'eglib')
-rw-r--r--eglib/ChangeLog7
-rw-r--r--eglib/src/gmisc-win32.c15
2 files changed, 17 insertions, 5 deletions
diff --git a/eglib/ChangeLog b/eglib/ChangeLog
index cb7088f9a37..c421a095449 100644
--- a/eglib/ChangeLog
+++ b/eglib/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-19 Bill Holmes <billholmes54@gmail.com>
+
+ * gmisc-win32.c (g_path_is_absolute): Adding support for UNC
+ paths on Windows.
+
+ Contributed under MIT/X11 license.
+
2009-01-08 Bill Holmes <billholmes54@gmail.com>
* winconfig.h, src/gfile-posix.c :
diff --git a/eglib/src/gmisc-win32.c b/eglib/src/gmisc-win32.c
index 7e60293f5f2..f1fe019c550 100644
--- a/eglib/src/gmisc-win32.c
+++ b/eglib/src/gmisc-win32.c
@@ -93,11 +93,16 @@ g_path_is_absolute (const char *filename)
{
g_return_val_if_fail (filename != NULL, FALSE);
- if (filename[0] != '\0' && filename[1] != '\0' && filename[1] == ':' &&
- filename[2] != '\0' && (filename[2] == '\\' || filename[2] == '/'))
- return TRUE;
- else
- return FALSE;
+ if (filename[0] != '\0' && filename[1] != '\0')
+ if (filename[1] == ':' && filename[2] != '\0' &&
+ (filename[2] == '\\' || filename[2] == '/'))
+ return TRUE;
+ /* UNC paths */
+ else if (filename[0] == '\\' && filename[1] == '\\' &&
+ filename[2] != '\0')
+ return TRUE;
+
+ return FALSE;
}
const gchar *