If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
dkaip
Super wx Problem Solver
Posts: 334 Joined: Wed Jan 20, 2010 1:15 pm
Post
by dkaip » Sat Feb 08, 2020 5:22 pm
Hello.
I am trying to delete recursive empty dirs but taking error that there are not exist.
Code: Select all
wxString where-wxT("a dir of mine")
wxMessageBox(where+wxFileName::GetPathSeparator());
wxFileName::Rmdir(where, wxPATH_RMDIR_FULL);
I don’t know why.
Thank you
Jim.
dkaip
Super wx Problem Solver
Posts: 334 Joined: Wed Jan 20, 2010 1:15 pm
Post
by dkaip » Sun Feb 09, 2020 9:12 pm
In code
Code: Select all
wxString where;
{
wxDirDialog* openDirDialog = new wxDirDialog(NULL, "Choose directory ", "", wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
if (openDirDialog->ShowModal() == wxID_OK)where = openDirDialog->GetPath();
else return;
wxFileName::Rmdir(where, wxPATH_RMDIR_FULL);
}
i am taking error ...
Directory '/home/a/Εικόνες/scan' couldn't be deleted (error 2: No such file or directory)
Also with code ...
Code: Select all
wxString where;
{
wxDirDialog* openDirDialog = new wxDirDialog(NULL, "Choose directory ", "", wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
if (openDirDialog->ShowModal() == wxID_OK)where = openDirDialog->GetPath();
else return;
wxFileName::Rmdir(where+wxFileName::GetPathSeparator(), wxPATH_RMDIR_FULL);
}
Must exist a bug...
Thank you
Jim.
ONEEYEMAN
Part Of The Furniture
Posts: 7459 Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine
Post
by ONEEYEMAN » Mon Feb 10, 2020 3:58 pm
Hi,
Can you post an output of "ls -la /home/a/Εικόνες/"?
Also, what is the user that runs the application?
Thank you.