diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-12-12 20:29:58 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-12-12 20:29:58 +0100 |
commit | 539536069a6e1311921e4ead9b177d33df2bc102 (patch) | |
tree | 61245867461c9f331d92dd82631bae005c050dca | |
parent | d4e65382822a44c40946e08af4af82f322b6e464 (diff) |
Fix DELETE handling for private mode.
Public mode is still broken.
Reported by another.
-rwxr-xr-x | fshare.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -482,12 +482,12 @@ class FShareRequestHandler(hs.BaseHTTPRequestHandler): fname = self._process_path(self.path) - path = '/'.join((self.server.data_dir, fname)) + local_path = '/'.join((self.server.data_dir, fname)) try: - os.remove(targetpath) + os.remove(local_path) except FileNotFoundError: - self._logger.error('DELETE request for non-existing file: %s' % - local_path.decode('utf-8', errors = 'backslashreplace')) + self._logger.error('DELETE request for non-existing file: %s', + local_path) self.send_error(HTTPStatus.NOT_FOUND) return |