Skip to content

Commit

Permalink
Fix for #53
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Magnusson authored and visr committed Jun 18, 2018
1 parent dbd4894 commit d53e159
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NetCDF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ ncwrite(x::Array,fil::AbstractString,vname::AbstractString,start::Array)=ncwrite
This reads a NetCDF attribute `attname` from the specified file and variable. To read global attributes, set varname to `Global`.
"""
function ncgetatt(fil::AbstractString,vname::AbstractString,att::AbstractString)
nc= haskey(currentNcFiles,abspath(fil)) ? currentNcFiles[abspath(fil)] : open(fil,NC_WRITE)
nc= haskey(currentNcFiles,abspath(fil)) ? currentNcFiles[abspath(fil)] : open(fil)
return ( haskey(nc.vars,vname) ? get(nc.vars[vname].atts,att,nothing) : get(nc.gatts,att,nothing) )
end

Expand Down

0 comments on commit d53e159

Please sign in to comment.