aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erl_prim_loader.erl
AgeCommit message (Collapse)Author
2014-09-11Merge branch 'lrascao/fix_bug_windows_directory_symlinks' into maintMarcus Arendt
* 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
2014-08-12fix indentation, add comment describing windows symlink creation assumptionLuis Rascão
2014-07-09Fix handling of broken symlinks in filelibAnthony Ramine
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
2014-06-27fix escript archive symlinked across drivesLuis Rascão
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
2014-02-24Added support for ENEA OSELukas Larsson
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.
2013-11-18Merge branch 'maint'Siri Hansen
Conflicts: erts/preloaded/ebin/erl_prim_loader.beam
2013-11-15Fix bug with backslash in erl_prim_loader:normalize/1Siri Hansen
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.
2013-05-06Fix unmatched_return warning in erl_prim_loaderSiri Hansen
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-11Make prim_file skip invalid filenames in unicode modePatrik Nyblom
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.
2013-02-11prim_file: Always open non-file ports in binary modeBjörn Gustavsson
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.
2012-08-08Merge branch 'maint'Siri Hansen
Conflicts: erts/preloaded/ebin/erl_prim_loader.beam
2012-08-07Fix flattening of paths in erl_prim_loaderSiri Hansen
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.
2012-07-19erts: Remove VxWorks from preloadedBjörn-Egil Dahlberg
2012-07-18Merge branch 'ta/prim_archive-reloading' into maintHenrik Nord
* 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
2012-07-09Add comments to make erl_prim_loader primary archive handling more readableSiri Hansen
This commit introduces no functional change. It only adds comments and changes some function/variable names.
2012-07-09Fix erl_prim_loader errors in handling of primary archiveSiri Hansen
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.
2012-07-06[erts,kernel,stdlib] fix escript/primary archive reloadingTuncer Ayaz
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.
2011-12-05Fix typos in erts/preloaded/srcTuncer Ayaz
2011-11-17erts,kernel: Add type stream sockets to SCTPRaimo Niskanen
2011-09-26erl_prim_loader: Eliminate dialyzer warningBjörn Gustavsson
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.
2011-09-16Fix typos in erts/preloaded/srcTuncer Ayaz
2011-06-20Add more specs and typesHans Bolinder
An incorrect spec, rpc:yield/1, has been fixed.
2010-06-02Remove (harmless) warnings about min/max in core applicationsPatrik Nyblom
2010-02-11erts/preloaded: Add types and specsKostis Sagonas
2010-01-27OTP-8387 Explicit top directories in archive files are now optional.Håkan Mattsson
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.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP