Skip to content

Commit b477812

Browse files
committed
Updating 'shiny_include_files to have 777 perms
1 parent 6609d20 commit b477812

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

shiny/ui/_include_helpers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,14 @@ def maybe_copy_files(path: Path | str, include_files: bool) -> tuple[str, str]:
218218

219219
# To avoid unnecessary work when the same file is included multiple times,
220220
# use a directory scoped by a hash of the file.
221-
tmpdir = os.path.join(tempfile.gettempdir(), "shiny_include_files", hash)
221+
tmp_folder = os.path.join(
222+
os.path.basename(path), tempfile.gettempdir(), "shiny_include_files"
223+
)
224+
tmpdir = os.path.join(tmp_folder, hash)
222225
path_dest = os.path.join(tmpdir, os.path.basename(path))
223226
print("path_dest:", path_dest)
227+
print(tmp_folder)
228+
os.chmod(tmp_folder, 0o755)
224229

225230
# Since the hash/tmpdir should represent all the files in the path's directory,
226231
# we can check if it exists to determine if we have a cache hit

0 commit comments

Comments
 (0)