--- a/src/eric7/RemoteServerInterface/EricServerFileSystemInterface.py Mon Feb 05 12:09:13 2024 +0100 +++ b/src/eric7/RemoteServerInterface/EricServerFileSystemInterface.py Mon Feb 05 13:46:48 2024 +0100 @@ -118,12 +118,15 @@ directory listing. Each directory listing entry contains a dictionary with the relevant data. @rtype tuple of (str, str, dict) + @exception OSError raised in case the server reported an issue """ if directory is None: # sanitize the directory in case it is None directory = "" loop = QEventLoop() + ok = False + error = "" listedDirectory = "" separator = "" listing = [] @@ -137,12 +140,16 @@ @param params dictionary containing the reply data @type dict """ - nonlocal listedDirectory, listing, separator + nonlocal listedDirectory, listing, separator, ok, error if reply == "Listdir": - listedDirectory = params["directory"] - listing = params["listing"] - separator = params["separator"] + ok = params["ok"] + if ok: + listedDirectory = params["directory"] + listing = params["listing"] + separator = params["separator"] + else: + error = params["error"] loop.quit() self.__serverInterface.sendJson( @@ -153,6 +160,9 @@ ) loop.exec() + if not ok: + raise OSError(error) + return listedDirectory, separator, listing def stat(self, filename, stNames):