Skip to content

Commit

Permalink
Fix setups path chooser in preferences window
Browse files Browse the repository at this point in the history
- This was broken by #9
  • Loading branch information
parasyte committed Dec 14, 2021
1 parent f668ae0 commit eaaf974
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use copypasta::{ClipboardContext, ClipboardProvider};
use egui::widgets::color_picker::{color_edit_button_srgba, Alpha};
use egui::{CtxRef, Widget};
use hotwatch::Hotwatch;
use std::borrow::Cow;
use std::collections::{HashMap, VecDeque};
use std::path::Path;
use std::time::{Duration, Instant};
Expand Down Expand Up @@ -521,8 +522,10 @@ impl Gui {

// Setup exports path selection
ui.horizontal(|ui| {
let setups_path = self.config.get_setups_path();
let label = setups_path.to_string_lossy().ellipsis(50);
// XXX: Workaround for https://github.com/PolyMeilex/rfd/issues/32
let setups_path = self.config.get_setups_path().to_string_lossy();
let setups_path = setups_path.strip_prefix(r"\\?\").unwrap_or(&setups_path);
let label = Cow::Borrowed(setups_path).ellipsis(50);

ui.label("Setup exports path:");
if egui::Label::new(label)
Expand Down

0 comments on commit eaaf974

Please sign in to comment.