Skip to content

Commit

Permalink
Windows: Fix loading files with a long path.
Browse files Browse the repository at this point in the history
Better handling of a path which exceeds MAX_PATH when converted into UTF-8.
  • Loading branch information
AkiraMiyakoda committed Jan 19, 2018
1 parent 3aca9e3 commit 8eeee7e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Windows/MainWindowMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,18 +404,6 @@ namespace MainWindow {
Core_EnableStepping(false);
}

// TODO: What is this for / what does it fix?
if (browseDialog->GetType() != W32Util::AsyncBrowseDialog::DIR) {
// Decode the filename with fullpath.
char drive[MAX_PATH];
char dir[MAX_PATH];
char fname[MAX_PATH];
char ext[MAX_PATH];
_splitpath(filename.c_str(), drive, dir, fname, ext);

filename = std::string(drive) + std::string(dir) + std::string(fname) + std::string(ext);
}

filename = ReplaceAll(filename, "\\", "/");
NativeMessageReceived("boot", filename.c_str());
}
Expand Down

0 comments on commit 8eeee7e

Please sign in to comment.