Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » [BUG & Patch] TheIDE under POSIX dosen't open directories containing spaces.
[BUG & Patch] TheIDE under POSIX dosen't open directories containing spaces. [message #39939] Mon, 13 May 2013 20:34 Go to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I think I found next bug in the Ultimate++ library. What's wrong this time? I think option "Open file directory" does not work on POSIX like operating system when directory path contains space character for instance: "/home/tom/My Documents/".

How to reproduce?
1. File -> Edit file -> open file in directory containing space/s for example "/home/tom/Programs/The best program/main.cpp".
2. File -> Open file directory [Result: Can't open directory]

How to fix?
We need to modify ShellOpenFolder function (ide/Common - ComDlg.cpp - line 163)

void ShellOpenFolder(const String& dir)
{
	#if defined(PLATFORM_WIN32)
		LaunchWebBrowser(dir);
	#elif __APPLE__
		IGNORE_RESULT(
			system("open " + dir + " &")
		);
	#else
		String tempDir = dir;
		tempDir.Replace(" ", "\\ ");
		
		IGNORE_RESULT(
			system("xdg-open " + tempDir + " &")
		);
	#endif
}


All we need is to convert space to following character sequence: "\\ ". It means something like this: "/home/tom/Programs/The\ best\ program/main.cpp". Maybe the solution with tempDir isn't clean, but we need to copy dir varaible, because it is constant.

P.S.
1. Probably on mac we need also change this behaviour (We need to make tests).
2. I have tested this solution on Kubuntu 13.04 (GNU/Linux).

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Tue, 14 May 2013 11:53]

Report message to a moderator

Re: [BUG & Patch] TheIDE under POSIX dosen't open directories containing spaces. [message #40639 is a reply to message #39939] Sun, 25 August 2013 10:09 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks, patch applied.

Mirek
Previous Topic: Multiple configuration files with TheIDE
Next Topic: [FEATURE REQUEST] Can we support C++11 highlight?
Goto Forum:
  


Current Time: Thu Mar 28 15:52:29 CET 2024

Total time taken to generate the page: 0.01464 seconds