mIRC Home    About    Download    Register    News    Help

Print Thread
#266723 21/01/20 05:47 PM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
1. Bug#1. All archives created by $zip have the 'y' attribute, which is supposed to mean they're some kind of temp file:

//remove testzip.zip | echo -a $zip(testzip.zip,c,$mircini) | echo -a $file(testzip.zip).attr
returns: ay

Bug#2

2. There are a few filenames that return $null as an attribute even though 'n' is the attribute for 'no attribute'.

Part of this is the known issue here https://forums.mirc.com/ubbthreads.php/topics/45625/re-mirc-6-1-global-bug-still-there#Post45625 due to the filename (excluding the .extension) matching one of the windows device names. It prevents /write from or $read to filenames whose prefix matches one of the device names. i.e. "/write global.txt test" fails, and even when the file exists $read(global.txt,nt) returns $null.

While that part's a known issue, there are a few other filenames which also return .attr null, such as pagefile.sys and hiberfil.sys, but they aren't device names, and you can write to pagefile.sys without trouble. Depending on how deep you want to search, this shows all filenames where .attr returns $null:

//echo 3 -a $findfile(c:\,*,0,3,if ($file($parms).attr == $null) echo 4 -ag $file($parms).attr $parms)

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Quote
1. Bug#1. All archives created by $zip have the 'y' attribute, which is supposed to mean they're some kind of temp file:

This looks like a bug in the zip library that mIRC is using. It is creating files with a temporary attribute and not removing this when it finishes the zip file update. It should be possible to unset this once the library finishes.

Quote
2. There are a few filenames that return $null as an attribute even though 'n' is the attribute for 'no attribute'.

The $file().attr property uses the standard GetFileAttributes() API, so the result you are seeing is what that API is returning. It has nothing to do with device names.


Link Copied to Clipboard