@@ -54,25 +54,16 @@ static absl::StatusOr<int> RunEmacs(
5454  if  (kWindows  && release) {
5555    const  absl::StatusOr<FileName> root = runfiles->Resolve (install);
5656    if  (!root.ok ()) return  root.status ();
57-     //  The longest filename in the Emacs release archive has 140 characters.
58-     //  Round up to 150 for some buffer and the directory separator.
59-     constexpr  std::size_t  kMaxEntry  = 150 ;
60-     const  std::size_t  max_filename = MaxFilename ();
61-     CHECK_GT (max_filename, kMaxEntry );
62-     const  std::size_t  max_root = max_filename - kMaxEntry ;
63-     if  (root->string ().length () > max_root) {
64-       //  The filenames in the released Emacs archive are too long.  Create a
65-       //  drive letter to shorten them.
66-       absl::StatusOr<DosDevice> device = DosDevice::Create (*root);
67-       if  (!device.ok ()) return  device.status ();
68-       absl::StatusOr<FileName> program = FileName::FromString (
69-           device->name () + RULES_ELISP_NATIVE_LITERAL (" \\ bin\\ emacs.exe" 
70-       if  (!program.ok ()) return  program.status ();
71-       emacs = *std::move (program);
72-       dos_device = *std::move (device);
73-     }
74-   }
75-   if  (!dos_device.has_value ()) {
57+     //  The filenames in the released Emacs archive are too long.  Create a
58+     //  drive letter to shorten them.
59+     absl::StatusOr<DosDevice> device = DosDevice::Create (*root);
60+     if  (!device.ok ()) return  device.status ();
61+     absl::StatusOr<FileName> program = FileName::FromString (
62+         device->name () + RULES_ELISP_NATIVE_LITERAL (" \\ bin\\ emacs.exe" 
63+     if  (!program.ok ()) return  program.status ();
64+     emacs = *std::move (program);
65+     dos_device = *std::move (device);
66+   } else  {
7667    absl::StatusOr<FileName> binary = runfiles->Resolve (
7768        absl::StrCat (install, release ? " /bin/emacs.exe" " /emacs.exe" 
7869    if  (!binary.ok ()) return  binary.status ();
0 commit comments