U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » FileSel&FileList, Path » Application hangs on renaming directories accidentally
Re: Application hangs on renaming directories accidentally [message #52513 is a reply to message #52359] Mon, 14 October 2019 22:40 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
zsolt wrote on Sat, 14 September 2019 03:18
Some users try changing to a directory with double click, but too slowly, so FileSel changes the directory name editable.
But the user don't want to rename it, so presses Enter key.
This hangs the app for seconds on the top of a large directory tree. Just try it with Windows directory.

Proposed patch is very simple:

 void FileSel::Rename(const String& on, const String& nn) {
+	if(on == nn) return;
 #ifdef PLATFORM_WIN32
 	if(FileMove(FilePath(on), FilePath(nn)))
 


Applied, thank you.
 
Read Message
Read Message
Previous Topic: FileSel: sort by file modification time
Next Topic: FEATURE REQUEST: Navigation by desktop shortcuts
Goto Forum:
  


Current Time: Sat Sep 05 05:16:56 GMT+2 2026

Total time taken to generate the page: 0.00686 seconds