Fix: Windows에서 한글 파일명 분리 현상 해결
FTP RFC 2640 표준에 따라 파일명을 NFC 형식으로 전송하도록 변경. - 기존 NFD 변환 코드 제거 (convertFileListToNFD, denormalizeFilename 호출) - Windows 클라이언트: NFC로 받아 한글이 정상 표시 - Mac 클라이언트: NFC를 자동으로 NFD 변환하여 처리 - 파일 검색 시 NFD/NFC 양방향 호환성은 findFileWithNormalization()으로 유지 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -182,8 +182,6 @@ public class FTPSession implements Runnable {
|
||||
return;
|
||||
}
|
||||
String path = fileSystem.getCurrentPath();
|
||||
// Convert path to NFD format for MacOS compatibility
|
||||
path = denormalizeFilename(path);
|
||||
sendResponse(FTPResponse.PATHNAME_CREATED, "\"" + path + "\" is current directory");
|
||||
}
|
||||
|
||||
@@ -203,8 +201,6 @@ public class FTPSession implements Runnable {
|
||||
|
||||
if (fileSystem.changeDirectory(path)) {
|
||||
String currentPath = fileSystem.getCurrentPath();
|
||||
// Convert path to NFD format for MacOS compatibility
|
||||
currentPath = denormalizeFilename(currentPath);
|
||||
sendResponse(FTPResponse.REQUESTED_FILE_ACTION_OK, "Directory changed to " + currentPath);
|
||||
} else {
|
||||
sendResponse(FTPResponse.FILE_UNAVAILABLE, "Failed to change directory");
|
||||
@@ -219,8 +215,6 @@ public class FTPSession implements Runnable {
|
||||
|
||||
if (fileSystem.changeToParentDirectory()) {
|
||||
String currentPath = fileSystem.getCurrentPath();
|
||||
// Convert path to NFD format for MacOS compatibility
|
||||
currentPath = denormalizeFilename(currentPath);
|
||||
sendResponse(FTPResponse.REQUESTED_FILE_ACTION_OK, "Directory changed to " + currentPath);
|
||||
} else {
|
||||
sendResponse(FTPResponse.FILE_UNAVAILABLE, "Already at root directory");
|
||||
@@ -239,8 +233,6 @@ public class FTPSession implements Runnable {
|
||||
}
|
||||
|
||||
String fileList = fileSystem.formatFileList(true);
|
||||
// Convert filenames to NFD format for MacOS compatibility
|
||||
fileList = convertFileListToNFD(fileList);
|
||||
|
||||
sendResponse(FTPResponse.FILE_STATUS_OK, "Opening data connection for directory list");
|
||||
|
||||
@@ -272,8 +264,6 @@ public class FTPSession implements Runnable {
|
||||
}
|
||||
|
||||
String fileList = fileSystem.formatFileList(false);
|
||||
// Convert filenames to NFD format for MacOS compatibility
|
||||
fileList = convertFileListToNFD(fileList);
|
||||
|
||||
sendResponse(FTPResponse.FILE_STATUS_OK, "Opening data connection for name list");
|
||||
|
||||
@@ -309,8 +299,6 @@ public class FTPSession implements Runnable {
|
||||
|
||||
if (fileSystem.makeDirectory(dirName)) {
|
||||
String newPath = fileSystem.getCurrentPath() + "/" + dirName;
|
||||
// Convert path to NFD format for MacOS compatibility (NFC -> NFD for display)
|
||||
newPath = denormalizeFilename(newPath);
|
||||
sendResponse(FTPResponse.PATHNAME_CREATED, "\"" + newPath + "\" directory created");
|
||||
} else {
|
||||
sendResponse(FTPResponse.FILE_UNAVAILABLE, "Failed to create directory");
|
||||
|
||||
Reference in New Issue
Block a user