From 05f5c919a17657d87f030b5acab7b519cb54a4d3 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Tue, 28 Apr 2020 15:51:48 +0200 Subject: [PATCH] Used wrong error code, fixed that. --- .../frontend/dokany/ReadWriteAdapter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/cryptomator/frontend/dokany/ReadWriteAdapter.java b/src/main/java/org/cryptomator/frontend/dokany/ReadWriteAdapter.java index a53ecc2..ff099ac 100644 --- a/src/main/java/org/cryptomator/frontend/dokany/ReadWriteAdapter.java +++ b/src/main/java/org/cryptomator/frontend/dokany/ReadWriteAdapter.java @@ -154,8 +154,8 @@ private int createDirectory(Path path, CreationDisposition creationDisposition, } } catch (FileSystemException e) { if (Strings.nullToEmpty(e.getReason()).contains("path too long")) { - LOG.warn("zwCreateFile(): Creation of {} failed, name too long.", path); - return Win32ErrorCode.ERROR_BUFFER_OVERFLOW.getMask(); + LOG.warn("zwCreateFile(): Creation of {} failed, file name too long.", path); + return Win32ErrorCode.ERROR_FILENAME_EXCED_RANGE.getMask(); } else { LOG.debug("zwCreateFile(): IO error occured during the creation of {}.", path); LOG.debug("zwCreateFile(): ", e); @@ -253,8 +253,8 @@ else if ((attr != null && attr.isReadOnly() || ((rawFileAttributes & FileAttribu return Win32ErrorCode.ERROR_ACCESS_DENIED.getMask(); } catch (FileSystemException e) { if (Strings.nullToEmpty(e.getReason()).contains("path too long")) { - LOG.warn("zwCreateFile(): Creation of {} failed, name too long.", path); - return Win32ErrorCode.ERROR_BUFFER_OVERFLOW.getMask(); + LOG.warn("zwCreateFile(): Creation of {} failed, file name too long.", path); + return Win32ErrorCode.ERROR_FILENAME_EXCED_RANGE.getMask(); } else { LOG.debug("zwCreateFile(): IO error occured while opening handle to {}.", path); LOG.debug("zwCreateFile(): ", e); @@ -799,8 +799,8 @@ public int moveFile(WString rawPath, WString rawNewFileName, boolean rawReplaceI return Win32ErrorCode.ERROR_DIR_NOT_EMPTY.getMask(); } catch (FileSystemException e) { if (Strings.nullToEmpty(e.getReason()).contains("path too long")) { - LOG.warn("({}) Moving resource {} failed, name too long.", path); - return Win32ErrorCode.ERROR_BUFFER_OVERFLOW.getMask(); + LOG.warn("({}) Moving resource {} failed, file name too long.", dokanyFileInfo.Context, path); + return Win32ErrorCode.ERROR_FILENAME_EXCED_RANGE.getMask(); } else { LOG.debug("({}) moveFile(): IO error while moving resource {}.", dokanyFileInfo.Context, path); LOG.debug("moveFile(): ", e);