|
|
@@ -50,8 +50,9 @@ bool BufferManager::load_file(const std::filesystem::path& path) {
|
|
|
|
|
|
// Check if already open
|
|
|
for (const auto& buf : buffers_) {
|
|
|
- if (!buf->file_path()) continue;
|
|
|
- const auto& buf_path = *buf->file_path();
|
|
|
+ auto path_opt = buf->file_path();
|
|
|
+ if (!path_opt) continue;
|
|
|
+ const auto& buf_path = *path_opt;
|
|
|
|
|
|
bool is_same = false;
|
|
|
// Only use equivalent if BOTH exist on disk to avoid exceptions/errors
|