Skip to content

Commit

Permalink
replaced ../ to parent_path() in the audio file path name
Browse files Browse the repository at this point in the history
  • Loading branch information
safocl committed Jan 14, 2021
1 parent 1946093 commit 613d840
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.cache
Watcher
cmake_install.cmake
.git
Expand Down
4 changes: 2 additions & 2 deletions src/aclock/aclock.cpp
Expand Up @@ -76,9 +76,9 @@ void Aclock::on( const int hour,
std::make_unique< core::sdlplayer::SdlPlayer >();
auto conf = core::configure::Configure::init();
auto pathToSound { conf->getArgv0()
.parent_path()
.parent_path().parent_path()
.generic_u8string() +
"/../share/alarm.opus" };
"share/alarm.opus" };
player->playFromOpusFile( pathToSound,
obj.getSoundVolume() );
}
Expand Down
3 changes: 2 additions & 1 deletion src/timer/timer.cpp
Expand Up @@ -58,8 +58,9 @@ void Timer::start( const std::chrono::seconds & timerDuration,
std::filesystem::path pathToSound {
conf->getArgv0()
.parent_path()
.parent_path()
.generic_u8string() +
"/../share/alarm.opus"
"share/alarm.opus"
};
player->playFromOpusFile( pathToSound,
obj.getSoundVolume() );
Expand Down

0 comments on commit 613d840

Please sign in to comment.