[vlc-devel] [PATCH v2 5/5] media_library: Fix misleading fs error handling

Alaric Senat dev.asenat at posteo.net
Fri Feb 5 11:47:50 UTC 2021


Switch to a more generic error message.
Theses errors message can be triggered by local filesystem errors or
timeouts. Assuming all the errors will come from network is incorrect!
---
 modules/misc/medialibrary/fs/directory.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/misc/medialibrary/fs/directory.cpp b/modules/misc/medialibrary/fs/directory.cpp
index 12253ce30a..397866d61e 100644
--- a/modules/misc/medialibrary/fs/directory.cpp
+++ b/modules/misc/medialibrary/fs/directory.cpp
@@ -173,7 +173,7 @@ static bool request_metadata_sync( libvlc_int_t *libvlc, input_item_t *media,
         if ( res != 0 )
         {
             throw medialibrary::fs::errors::System(
-                ETIMEDOUT, "Failed to browse network directory: Network is too slow" );
+                ETIMEDOUT, "Failed to browse directory: Operation timed out" );
         }
     }
     return req.success;
@@ -196,7 +196,7 @@ SDDirectory::read() const
 
     if ( status == false )
         throw medialibrary::fs::errors::System(
-            EIO, "Failed to browse network directory: Unknown error" );
+            EIO, "Failed to browse directory: Unknown error" );
 
     for ( const InputItemPtr& m : children )
     {
-- 
2.28.0



More information about the vlc-devel mailing list