v1.12.2 - Fixed a bug in the filesystem library where moving a file to a different drive would error out.
This commit is contained in:
@@ -235,8 +235,7 @@ function filesystem.rename(fromPath, toPath)
|
||||
if fromAddress == toAddress then
|
||||
return component.invoke(fromAddress, "rename", fromAbsPath, toAbsPath)
|
||||
else
|
||||
local handle = component.invoke(fromAddress, "open", fromAbsPath, "r")
|
||||
local data, tmpdata
|
||||
local handle, data, tmpdata = component.invoke(fromAddress, "open", fromAbsPath, "r"), "", nil
|
||||
repeat
|
||||
tmpdata = component.invoke(fromAddress, "read", handle, math.huge or math.maxinteger)
|
||||
data = data .. (tmpdata or "")
|
||||
|
||||
Reference in New Issue
Block a user