When Is A Drive Really Read Only?

new topic     » topic index » view thread      » older message » newer message

I have a user who says my app is saying his access to a folder is blocked (read only). However, he can use Notepad to create files in that same folder.

Am I determining read/write status improperly? Here's my code:

public function write_to_path(sequence p) 
integer res = 0 
 
	dp("write access to '" & p & "'") 
	object d = dir(p) 
 
	if sequence(d) then 
		-- dp(sprintf("ATTRIBUTES: %s", { d[1][D_ATTRIBUTES] })) 
		res = find('d', d[1][D_ATTRIBUTES]) and not find('r',d[1][D_ATTRIBUTES]) 
	end if 
	if res then 
		dp("...Allowed!",{}) 
	else 
		dp("...Denied!",{}) 
	end if 
	 
	return res 
end function 

dp() is just a debug printing function.

This is for Windows OS-based PCs.

Any help appreciated!

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu