Make sure users has rights to directory on export.
This commit is contained in:
parent
fd8d57708d
commit
2631525040
@ -93,6 +93,20 @@ namespace Novell.CASA.GUI
|
||||
|
||||
if (sFileName != null)
|
||||
{
|
||||
|
||||
#if LINUX
|
||||
// make sure user has 'Write' rights to this directory
|
||||
string sDir = sFileName.Substring(0, sFileName.LastIndexOf("/"));
|
||||
int rcode = Mono.Unix.Native.Syscall.access(sDir,
|
||||
Mono.Unix.Native.AccessModes.R_OK |
|
||||
Mono.Unix.Native.AccessModes.W_OK );
|
||||
if (rcode != 0)
|
||||
{
|
||||
CommonGUI.DisplayMessage(Gtk.MessageType.Error, "You do not have rights to export your files here.\r\n"+sDir);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Store off this location for next export
|
||||
|
||||
int iLastSlash = sFileName.LastIndexOf("/");
|
||||
|
Loading…
Reference in New Issue
Block a user