From a9ac6a12e581a97ffd14916d744ab1e22f9e545b Mon Sep 17 00:00:00 2001 From: Brennen Murphy Date: Tue, 3 Dec 2024 21:42:26 -0500 Subject: [PATCH] fix for copying & pasting in CL --- extras/menus/arkMenu/src/browser.cpp | 6 +++++- extras/menus/arkMenu/src/browser_entries.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/extras/menus/arkMenu/src/browser.cpp b/extras/menus/arkMenu/src/browser.cpp index cbf14585..7bfa1770 100644 --- a/extras/menus/arkMenu/src/browser.cpp +++ b/extras/menus/arkMenu/src/browser.cpp @@ -1253,6 +1253,9 @@ void Browser::copyFolder(string path){ string destination = checkDestExists(path, this->cwd, f->getName().substr(0, f->getName().length()-1)); if (destination.size() == 0) return; // copy cancelled + + if (destination[destination.size() - 1] == '/') + destination.resize(destination.length() - 1); copy_folder_recursive(path.substr(0, path.length()-1).c_str(), destination.c_str()); } @@ -1320,8 +1323,9 @@ void Browser::fillClipboard(){ this->clipboard->clear(); for (int i=0; isize(); i++){ BrowserFile* e = (File*)entries->at(i); - if (e->isSelected()) + if (e->isSelected()) { this->clipboard->push_back(e->getPath()); + } } } diff --git a/extras/menus/arkMenu/src/browser_entries.cpp b/extras/menus/arkMenu/src/browser_entries.cpp index 67591faa..062d0f72 100644 --- a/extras/menus/arkMenu/src/browser_entries.cpp +++ b/extras/menus/arkMenu/src/browser_entries.cpp @@ -98,7 +98,8 @@ void BrowserFile::changeSelection(){ } string BrowserFile::getPath(){ - return (shortname.size() > 0)? parent+shortname : path; + return path; + //return (shortname.size() > 0) ? parent+shortname : path + '/'; } string BrowserFile::getName(){