aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2025-11-19 16:36:06 -0800
committerJeff Halter <868228+jhalter@users.noreply.github.com>2025-11-19 16:36:06 -0800
commit1b2df8a630bfc83304ef90610bdf7ebe91d4e555 (patch)
tree9a9df319d5cc16ab9cdebf481515c11f648a4ba1 /internal
parentb395859da4937fa4c3064f4e022e46690df8f2d4 (diff)
Fix error when downloading incomplete files
Diffstat (limited to 'internal')
-rw-r--r--internal/mobius/transaction_handlers.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/internal/mobius/transaction_handlers.go b/internal/mobius/transaction_handlers.go
index 52ea29a..20a315d 100644
--- a/internal/mobius/transaction_handlers.go
+++ b/internal/mobius/transaction_handlers.go
@@ -86,11 +86,10 @@ const (
// General error messages
ErrMsgAccountNotFound = "Account not found."
- ErrMsgUserNotFound = "User not found."
- ErrMsgCreateAlias = "Error creating alias"
+ ErrMsgUserNotFound = "User not found."
+ ErrMsgCreateAlias = "Error creating alias"
)
-
// Converts bytes from Mac Roman encoding to UTF-8
var txtDecoder = charmap.Macintosh.NewDecoder()
@@ -307,7 +306,7 @@ func HandleGetFileInfo(cc *hotline.ClientConn, t *hotline.Transaction) (res []ho
return res
}
- fw, err := hotline.NewFileWrapper(cc.Server.FS, fullFilePath, 0)
+ fw, err := hotline.NewFile(cc.Server.FS, fullFilePath, 0)
if err != nil {
return res
}
@@ -361,7 +360,7 @@ func HandleSetFileInfo(cc *hotline.ClientConn, t *hotline.Transaction) (res []ho
return res
}
- hlFile, err := hotline.NewFileWrapper(cc.Server.FS, fullFilePath, 0)
+ hlFile, err := hotline.NewFile(cc.Server.FS, fullFilePath, 0)
if err != nil {
return res
}
@@ -449,7 +448,7 @@ func HandleDeleteFile(cc *hotline.ClientConn, t *hotline.Transaction) (res []hot
return res
}
- hlFile, err := hotline.NewFileWrapper(cc.Server.FS, fullFilePath, 0)
+ hlFile, err := hotline.NewFile(cc.Server.FS, fullFilePath, 0)
if err != nil {
return res
}
@@ -494,7 +493,7 @@ func HandleMoveFile(cc *hotline.ClientConn, t *hotline.Transaction) (res []hotli
cc.Logger.Info("Move file", "src", filePath+"/"+fileName, "dst", fileNewPath+"/"+fileName)
- hlFile, err := hotline.NewFileWrapper(cc.Server.FS, filePath, 0)
+ hlFile, err := hotline.NewFile(cc.Server.FS, filePath, 0)
if err != nil {
return res
}
@@ -1553,7 +1552,7 @@ func HandleDownloadFile(cc *hotline.ClientConn, t *hotline.Transaction) (res []h
return res
}
- hlFile, err := hotline.NewFileWrapper(cc.Server.FS, fullFilePath, dataOffset)
+ hlFile, err := hotline.NewFile(cc.Server.FS, fullFilePath, dataOffset)
if err != nil {
return res
}