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++ Library support » FileSel&FileList, Path » Application hangs on renaming directories accidentally
Application hangs on renaming directories accidentally [message #52359] Sat, 14 September 2019 03:18 Go to next message
zsolt is currently offline  zsolt
Messages: 696
Registered: December 2005
Location: Budapest, Hungary
Contributor
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)))
 

[Updated on: Mon, 14 October 2019 18:14]

Report message to a moderator

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: 13975
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.
Previous Topic: FileSel: sort by file modification time
Next Topic: FEATURE REQUEST: Navigation by desktop shortcuts
Goto Forum:
  


Current Time: Sat Apr 20 00:02:00 CEST 2024

Total time taken to generate the page: 0.04233 seconds