[Github-comments] [geany/geany] Remove deprecated symbol: tm_get_real_path (PR #3024)

xiota notifications at xxxxx
Wed Dec 1 14:06:42 UTC 2021


@xiota commented on this pull request.



> @@ -2414,17 +2419,39 @@ void utils_start_new_geany_instance(const gchar *doc_path)
 }
 
 
+#if defined(G_OS_WIN32) && !defined(HAVE_REALPATH)
+/* realpath implementation for Windows found at http://bugzilla.gnome.org/show_bug.cgi?id=342926
+ * this one is better than e.g. liberty's lrealpath because this one uses Win32 API and works
+ * with special chars within the filename */
+static char *realpath(const char *pathname, char *resolved_path)
+{
+	int size;
+
+	if (resolved_path != NULL)
+	{
+		size = GetFullPathName(pathname, PATH_MAX, resolved_path, NULL);

I had read that this version of the function would automatically use the A or W version depending on whether unicode is enabled.  But further reading indicates that it's not so straightforward to switch between the two versions.  So will revert the change.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3024#discussion_r760215398
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211201/44fdd948/attachment.htm>


More information about the Github-comments mailing list