Age | Commit message (Collapse) | Author |
|
* lrascao/fix_bug_windows_directory_symlinks:
fix indentation, add comment describing windows symlink creation assumption
fix escript archive symlinked across drives
OTP-12155
OTP-12154
OTP-12153
|
|
|
|
This fixes a bug introduced in f11aabdc9fec593c31e6c4f3fa25c1707e9c35df where
filelib:eval_read_file_info/2 was made to use file:read_link_info/1 to never
follow symlinks. This fixed wildcard/1 but broke every other function using
eval_read_file_info/2.
Reported-by: Louis-Philippe Gauthier
Reported-by: Danil Zagoskin
|
|
real_path method used while prim loading archive files was not taking into account
the fact that windows directory symlinks can be across different drives
(eg. c:\tmp\test is a symlink to j:\tmp\test). when performing a path split the drive
precedes the symlink, but that has be rewritten also since it's different. This issue
never arises in Unix since obviously there are no drives
|
|
This port has support for both non-smp and smp.
It contains a new way to do io checking in which erts_poll_wait
receives the payload of the polled entity. This has implications
for all linked-in drivers.
|
|
Conflicts:
erts/preloaded/ebin/erl_prim_loader.beam
|
|
This function normalizes a path:
* convert atoms to strings
* flatten strings
* convert backslash to a forward slash
The bugfix is to only convert backslashes to forward slashes on
windows and not on any other platforms.
|
|
|
|
|
|
The fix affects list_dir and read_link. Raw filenames are now
never produced, just consumed even if +fnu or +fna is used on
Linux etc.
This also adds the options to get error return or error handler
warning messages with +fn{u|a}{i|w|e} as an option to erl.
This is still not documented and there needs to be other versions
of read_dir and read_link to facilitate reading of all types
of filenames and links.
A check that we will not change to an invalid directory is also needed.
|
|
Ports for operations that did not directly operate on a file (such
as listing the files in a directory) was always opened in a binary
mode, but there was still code that supported such port opened in
non-binary mode.
Since we are about to update the code reading directories, and we
don't want to bother we supporting non-binary ports, make sure that
we force the use of binary mode.
|
|
Conflicts:
erts/preloaded/ebin/erl_prim_loader.beam
|
|
When correcting OTP-10071, a new error was introduced in
erl_prim_loader. In order to improve ability to detect if a file was
inside the primary archive, all paths were flattened - i.e. "." and
".." were removed. This implementation had some faults, and it did not
take symlinks into account. This has been corrected.
|
|
|
|
* ta/prim_archive-reloading:
escript_SUITE: remove gratuitous space
[erts,kernel,stdlib] fix escript/primary archive reloading
Conflicts:
erts/preloaded/src/erl_prim_loader.erl
OTP-10151
|
|
This commit introduces no functional change. It only adds comments and
changes some function/variable names.
|
|
The following errors have been corrected:
* If primary archive was named "xxx", then a file in the same
directory named "xxxyyy" would be interpreted as a file named yyy
inside the archive.
* erl_prim_loader did not correctly create and normalize absolute
paths for primary archive and files inside it, so unless given with
exact same path files inside the archive would not be found. E.g. if
escript was started as /full/path/to/xxx then "./xxx/file" would not
be found since erl_prim_loader would try to match /full/path/to/xxx
with /full/path/to/./xxx. Same problem with ../.
* Depending on how the primary archive was built,
erl_prim_loader:list_dir/1 would sometimes return an empty string
inside the file list. This was a virtual element representing the
top directory of the archive. This has been removed.
Thanks to Tuncer Ayaz and Shunichi Shinohara for reporting and
co-authoring corrections.
|
|
If the mtime of an escript/primary archive file changes after being
added to the code path, correctly reload the archive and update the
cache.
The existing code didn't consider that it might be a zip archive and failed:
=ERROR REPORT==== 3-Aug-2011::09:21:21 ===
File operation error: bad_central_directory. Target:
/escript_archive/module.beam. Function: get_file. Process: code_server.
Thanks David Reid and Hakan Mattson.
|
|
|
|
|
|
The concat/1 function is now only used to append lists when
constructing filenames. Thus it is too general and the first
clause (that handles characters) will never be used.
We could just remove the clause that is never used, but then the
name 'concat' would be misleading and someone could use misuse it.
Therefore, replace concat/1 with the join/2 function that can only
be used for joining filename components.
|
|
|
|
An incorrect spec, rpc:yield/1, has been fixed.
|
|
|
|
|
|
For example, if an archive (app-vsn.ez) just contains an
app-vsn/ebin/mod.beam file, the file info for the app-vsn and
app-vsn/ebin directories are faked using the file info from the
archive file as origin. The virtual direcories can also be
listed. For short, the top directories are virtual if they does
not exist.
|
|
|