Skip to content

Commit

Permalink
fix Large File Name RENAME ERROR (Win Error 3) (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcanto-hopeit committed Feb 23, 2024
1 parent ee292a7 commit 7fc9000
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/examples/client-example/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@
},
"engine_version": {
"type": "string",
"default": "0.21.2"
"default": "0.21.3"
}
},
"x-module-name": "hopeit.server.config",
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/simple-example/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@
},
"engine_version": {
"type": "string",
"default": "0.21.2"
"default": "0.21.3"
}
},
"x-module-name": "hopeit.server.config",
Expand Down
7 changes: 7 additions & 0 deletions docs/source/release-notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Release Notes
=============

Version 0.21.3
______________
- Plugin:

fs-storage: Resolved compatibility issues with long file names on Windows


Version 0.21.2
______________
- Engine:
Expand Down
2 changes: 1 addition & 1 deletion engine/src/hopeit/server/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys

ENGINE_NAME = "hopeit.engine"
ENGINE_VERSION = "0.21.2"
ENGINE_VERSION = "0.21.3"

# Major.Minor version to be used in App versions and Api endpoints for Apps/Plugins
APPS_API_VERSION = '.'.join(ENGINE_VERSION.split('.')[0:2])
Expand Down
2 changes: 1 addition & 1 deletion plugins/ops/apps-visualizer/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@
},
"engine_version": {
"type": "string",
"default": "0.21.2"
"default": "0.21.3"
}
},
"x-module-name": "hopeit.server.config",
Expand Down
3 changes: 2 additions & 1 deletion plugins/storage/fs/src/hopeit/fs_storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
from dataclasses import dataclass
import os
import shutil
from glob import glob
from pathlib import Path
import uuid
Expand Down Expand Up @@ -166,5 +167,5 @@ async def _save_file(payload_str: str, *, path: Path, file_name: str) -> str:
async with aiofiles.open(tmp_path, 'w') as f: # type: ignore
await f.write(payload_str)
await f.flush()
os.rename(str(tmp_path), str(file_path))
shutil.move(str(tmp_path), str(file_path))
return str(file_path)

0 comments on commit 7fc9000

Please sign in to comment.