File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,9 @@ namespace FS {
138
138
139
139
bool Rename (FsDirectoryEntry &entry, const std::string &dest_path) {
140
140
std::string src_path = FS::BuildPath (entry);
141
+ std::string full_dest_path = FS::BuildPath (dest_path, true );
141
142
142
- if (rename (src_path.c_str (), dest_path .c_str ()) != 0 ) {
143
+ if (rename (src_path.c_str (), full_dest_path .c_str ()) != 0 ) {
143
144
Log::Error (" FS::Rename(%s, %s) failed.\n " , src_path.c_str (), dest_path.c_str ());
144
145
return false ;
145
146
}
Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ namespace Popups {
84
84
85
85
if (ImGui::Button (strings[cfg.lang ][Lang::OptionsRename], ImVec2 (200 , 50 ))) {
86
86
std::string path = Keyboard::GetText (strings[cfg.lang ][Lang::OptionsRenamePrompt], data.entries [data.selected ].name );
87
- if (R_SUCCEEDED (FS::Rename (data.entries [data.selected ], path.c_str ()))) {
87
+
88
+ if (FS::Rename (data.entries [data.selected ], path.c_str ())) {
88
89
Options::RefreshEntries (false );
89
90
sort = -1 ;
90
91
}
You can’t perform that action at this time.
0 commit comments