mirror of
https://github.com/9001/copyparty.git
synced 2025-08-16 00:22:13 -06:00
ftp: fix potential utime issue; closes #539
This commit is contained in:
parent
23ea1c8a14
commit
43a19779c1
|
@ -409,8 +409,12 @@ class FtpFs(AbstractedFS):
|
|||
return st
|
||||
|
||||
def utime(self, path: str, timeval: float) -> None:
|
||||
ap = self.rv2a(path, w=True)[0]
|
||||
return bos.utime(ap, (timeval, timeval))
|
||||
try:
|
||||
ap = self.rv2a(path, w=True)[0]
|
||||
return bos.utime(ap, (int(time.time()), int(timeval)))
|
||||
except Exception as ex:
|
||||
logging.error("ftp.utime: %s, %r", ex, ex)
|
||||
raise
|
||||
|
||||
def lstat(self, path: str) -> os.stat_result:
|
||||
ap = self.rv2a(path)[0]
|
||||
|
|
Loading…
Reference in a new issue