Skip to content

Commit

Permalink
Merge pull request #338 from emcrisostomo:337-fswatch-exits-on-non-ex…
Browse files Browse the repository at this point in the history
…isting-path

Issue 337: fswatch exists on non existing path
  • Loading branch information
emcrisostomo authored Jan 27, 2025
2 parents 4ebf855 + bd6cdb6 commit be41e0e
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 118 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# this program. If not, see <http://www.gnu.org/licenses/>.
#
cmake_minimum_required(VERSION 3.14)
project(fswatch VERSION 1.19.0 LANGUAGES C CXX)
project(fswatch VERSION 1.18.2 LANGUAGES C CXX)

#@formatter:off
set(PACKAGE "${PROJECT_NAME}")
set(PACKAGE_NAME "${PACKAGE}")
set(PACKAGE_VERSION "${PROJECT_VERSION}-develop")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_AUTHOR "enrico.m.crisostomo@gmail.com")
set(PACKAGE_BUGREPORT "${PACKAGE_AUTHOR}")
Expand Down
2 changes: 1 addition & 1 deletion fswatch/src/fswatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static void start_monitor(int argc, char **argv, int optind)

for (auto i = optind; i < argc; ++i)
{
std::string path = std::filesystem::canonical(argv[i]).string();
std::string path = std::filesystem::absolute(argv[i]).string();

FSW_ELOGF(_("Adding path: %s\n"), path.c_str());

Expand Down
2 changes: 1 addition & 1 deletion m4/fswatch_version.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
#
m4_define([FSWATCH_VERSION], [1.19.0-develop])
m4_define([FSWATCH_VERSION], [1.18.2])
m4_define([FSWATCH_REVISION], [1])
2 changes: 1 addition & 1 deletion m4/libfswatch_version.m4
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
#
# Libtool documentation, 7.3 Updating library version information
#
m4_define([LIBFSWATCH_VERSION], [1.19.0-develop])
m4_define([LIBFSWATCH_VERSION], [1.18.2])
m4_define([LIBFSWATCH_API_VERSION], [13:1:0])
m4_define([LIBFSWATCH_REVISION], [1])
36 changes: 18 additions & 18 deletions po/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fswatch 1.11.3\n"
"Report-Msgid-Bugs-To: enrico.m.crisostomo@gmail.com\n"
"POT-Creation-Date: 2025-01-18 01:36+0100\n"
"POT-Creation-Date: 2025-01-27 11:53+0100\n"
"PO-Revision-Date: 2017-10-29 14:04+0100\n"
"Last-Translator: Enrico Maria Crisostomo <enrico.m.crisostomo@gmail.com>\n"
"Language-Team: English\n"
Expand Down Expand Up @@ -283,11 +283,11 @@ msgstr ""
msgid "An unknown error occurred and the program will be terminated.\n"
msgstr ""

#: libfswatch/src/libfswatch/c++/event.cpp:82
#: libfswatch/src/libfswatch/c++/event.cpp:83
msgid "Unknown event type: "
msgstr ""

#: libfswatch/src/libfswatch/c++/event.cpp:112
#: libfswatch/src/libfswatch/c++/event.cpp:114
msgid "Unknown event type."
msgstr ""

Expand Down Expand Up @@ -315,9 +315,9 @@ msgid "Cannot allocate memory"
msgstr ""

#: libfswatch/src/libfswatch/c++/fen_monitor.cpp:296
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:175
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:218
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:156
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:180
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:226
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:163
#, c-format
msgid "Filesystem error: %s"
msgstr ""
Expand Down Expand Up @@ -396,44 +396,44 @@ msgstr ""
msgid "Added: "
msgstr ""

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:252
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:258
msgid "Generic event: "
msgstr ""

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:344
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:350
msgid "Removed: "
msgstr ""

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:431
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:437
msgid "Number of records: "
msgstr ""

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:437
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:443
msgid "read() on inotify descriptor read 0 records."
msgstr ""

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:443
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:449
msgid "read() on inotify descriptor returned -1."
msgstr ""

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:166
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:169
#, c-format
msgid "Cannot open %s"
msgstr ""

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:271
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:279
msgid "kqueue already running."
msgstr ""

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:278
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:286
msgid "kqueue failed."
msgstr ""

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:304
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:312
msgid "kevent returned -1, invalid event number."
msgstr ""

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:323
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:331
msgid "Event with EV_ERROR"
msgstr ""

Expand Down Expand Up @@ -474,7 +474,7 @@ msgstr ""
msgid "Event queue overflow."
msgstr ""

#: libfswatch/src/libfswatch/c++/monitor.cpp:384
#: libfswatch/src/libfswatch/c++/monitor.cpp:381
#, c-format
msgid "Notifying events #: %d.\n"
msgstr ""
Expand All @@ -495,7 +495,7 @@ msgstr ""
msgid "Cannot lstat %s"
msgstr ""

#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:217
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:224
msgid "Done scanning.\n"
msgstr ""

Expand Down
40 changes: 20 additions & 20 deletions po/en@boldquot.po
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: fswatch 1.18.1\n"
"Project-Id-Version: fswatch 1.18.2\n"
"Report-Msgid-Bugs-To: enrico.m.crisostomo@gmail.com\n"
"POT-Creation-Date: 2025-01-18 01:36+0100\n"
"PO-Revision-Date: 2025-01-18 01:36+0100\n"
"POT-Creation-Date: 2025-01-27 11:53+0100\n"
"PO-Revision-Date: 2025-01-27 11:53+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: en@boldquot\n"
Expand Down Expand Up @@ -316,11 +316,11 @@ msgstr "An error occurred and the program will be terminated.\n"
msgid "An unknown error occurred and the program will be terminated.\n"
msgstr "An unknown error occurred and the program will be terminated.\n"

#: libfswatch/src/libfswatch/c++/event.cpp:82
#: libfswatch/src/libfswatch/c++/event.cpp:83
msgid "Unknown event type: "
msgstr "Unknown event type: "

#: libfswatch/src/libfswatch/c++/event.cpp:112
#: libfswatch/src/libfswatch/c++/event.cpp:114
msgid "Unknown event type."
msgstr "Unknown event type."

Expand Down Expand Up @@ -348,9 +348,9 @@ msgid "Cannot allocate memory"
msgstr "Cannot allocate memory"

#: libfswatch/src/libfswatch/c++/fen_monitor.cpp:296
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:175
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:218
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:156
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:180
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:226
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:163
#, c-format
msgid "Filesystem error: %s"
msgstr "Filesystem error: %s"
Expand Down Expand Up @@ -429,44 +429,44 @@ msgstr "Removing: "
msgid "Added: "
msgstr "Added: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:252
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:258
msgid "Generic event: "
msgstr "Generic event: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:344
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:350
msgid "Removed: "
msgstr "Removed: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:431
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:437
msgid "Number of records: "
msgstr "Number of records: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:437
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:443
msgid "read() on inotify descriptor read 0 records."
msgstr "read() on inotify descriptor read 0 records."

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:443
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:449
msgid "read() on inotify descriptor returned -1."
msgstr "read() on inotify descriptor returned -1."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:166
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:169
#, c-format
msgid "Cannot open %s"
msgstr "Cannot open %s"

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:271
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:279
msgid "kqueue already running."
msgstr "kqueue already running."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:278
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:286
msgid "kqueue failed."
msgstr "kqueue failed."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:304
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:312
msgid "kevent returned -1, invalid event number."
msgstr "kevent returned -1, invalid event number."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:323
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:331
msgid "Event with EV_ERROR"
msgstr "Event with EV_ERROR"

Expand Down Expand Up @@ -507,7 +507,7 @@ msgstr "Stopping the monitor.\n"
msgid "Event queue overflow."
msgstr "Event queue overflow."

#: libfswatch/src/libfswatch/c++/monitor.cpp:384
#: libfswatch/src/libfswatch/c++/monitor.cpp:381
#, c-format
msgid "Notifying events #: %d.\n"
msgstr "Notifying events #: %d.\n"
Expand All @@ -528,7 +528,7 @@ msgstr "Cannot stat %s"
msgid "Cannot lstat %s"
msgstr "Cannot lstat %s"

#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:217
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:224
msgid "Done scanning.\n"
msgstr "Done scanning.\n"

Expand Down
40 changes: 20 additions & 20 deletions po/en@quot.po
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: fswatch 1.18.1\n"
"Project-Id-Version: fswatch 1.18.2\n"
"Report-Msgid-Bugs-To: enrico.m.crisostomo@gmail.com\n"
"POT-Creation-Date: 2025-01-18 01:36+0100\n"
"PO-Revision-Date: 2025-01-18 01:36+0100\n"
"POT-Creation-Date: 2025-01-27 11:53+0100\n"
"PO-Revision-Date: 2025-01-27 11:53+0100\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: en@quot\n"
Expand Down Expand Up @@ -313,11 +313,11 @@ msgstr "An error occurred and the program will be terminated.\n"
msgid "An unknown error occurred and the program will be terminated.\n"
msgstr "An unknown error occurred and the program will be terminated.\n"

#: libfswatch/src/libfswatch/c++/event.cpp:82
#: libfswatch/src/libfswatch/c++/event.cpp:83
msgid "Unknown event type: "
msgstr "Unknown event type: "

#: libfswatch/src/libfswatch/c++/event.cpp:112
#: libfswatch/src/libfswatch/c++/event.cpp:114
msgid "Unknown event type."
msgstr "Unknown event type."

Expand Down Expand Up @@ -345,9 +345,9 @@ msgid "Cannot allocate memory"
msgstr "Cannot allocate memory"

#: libfswatch/src/libfswatch/c++/fen_monitor.cpp:296
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:175
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:218
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:156
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:180
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:226
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:163
#, c-format
msgid "Filesystem error: %s"
msgstr "Filesystem error: %s"
Expand Down Expand Up @@ -426,44 +426,44 @@ msgstr "Removing: "
msgid "Added: "
msgstr "Added: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:252
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:258
msgid "Generic event: "
msgstr "Generic event: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:344
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:350
msgid "Removed: "
msgstr "Removed: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:431
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:437
msgid "Number of records: "
msgstr "Number of records: "

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:437
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:443
msgid "read() on inotify descriptor read 0 records."
msgstr "read() on inotify descriptor read 0 records."

#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:443
#: libfswatch/src/libfswatch/c++/inotify_monitor.cpp:449
msgid "read() on inotify descriptor returned -1."
msgstr "read() on inotify descriptor returned -1."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:166
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:169
#, c-format
msgid "Cannot open %s"
msgstr "Cannot open %s"

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:271
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:279
msgid "kqueue already running."
msgstr "kqueue already running."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:278
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:286
msgid "kqueue failed."
msgstr "kqueue failed."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:304
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:312
msgid "kevent returned -1, invalid event number."
msgstr "kevent returned -1, invalid event number."

#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:323
#: libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:331
msgid "Event with EV_ERROR"
msgstr "Event with EV_ERROR"

Expand Down Expand Up @@ -504,7 +504,7 @@ msgstr "Stopping the monitor.\n"
msgid "Event queue overflow."
msgstr "Event queue overflow."

#: libfswatch/src/libfswatch/c++/monitor.cpp:384
#: libfswatch/src/libfswatch/c++/monitor.cpp:381
#, c-format
msgid "Notifying events #: %d.\n"
msgstr "Notifying events #: %d.\n"
Expand All @@ -525,7 +525,7 @@ msgstr "Cannot stat %s"
msgid "Cannot lstat %s"
msgstr "Cannot lstat %s"

#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:217
#: libfswatch/src/libfswatch/c++/poll_monitor.cpp:224
msgid "Done scanning.\n"
msgstr "Done scanning.\n"

Expand Down
Loading

0 comments on commit be41e0e

Please sign in to comment.