Skip to content

Commit

Permalink
Guard some Unix-only logic
Browse files Browse the repository at this point in the history
This should make blobdrop compile on Windows.
  • Loading branch information
vimpostor committed Nov 6, 2023
1 parent 67a813e commit e9eba65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
#include <cstdlib>
#include <format>
#include <iostream>
#include <pwd.h>
#include <unistd.h>

#ifdef Q_OS_UNIX
#include <pwd.h>
#endif

namespace Util {

const char *home_dir() {
Expand Down
4 changes: 4 additions & 0 deletions src/path_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

void PathRegistry::add_path(Path p) {
paths.emplace_back(p);
#ifdef Q_OS_UNIX
if (!Util::is_wayland()) {
// if no other frontend was explicitly selected,
// we could begin an immediate drag now (once startup is complete)
Settings::get()->can_drag_immediately = true;
}
#endif
emit pathAdded(p);
}

0 comments on commit e9eba65

Please sign in to comment.