Project

General

Profile

« Previous | Next » 

Revision 1289

Added by kweitzel over 14 years ago

Branch 2.8.1 merged back into Trunk

View differences:

io.php
72 72
	$sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ;
73 73

  
74 74
	// Ensure that the directory exists.
75
	$sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
75
	 $sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
76 76
	if ( $sErrorMsg != '' )
77
   /* if (!file_exists($sResourceTypePath)) */
77 78
		SendError( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ;
78 79

  
79 80
	// Return the resource type directory combined with the required path.
......
98 99
	}
99 100

  
100 101
	// Check if the parent exists, or create it.
101
	if ( !file_exists( $sParent ) )
102
	if ( !empty($sParent) && !file_exists( $sParent ) )
102 103
	{
103 104
		//prevents agains infinite loop when we can't create root folder
104 105
		if ( !is_null( $lastFolder ) && $lastFolder === $sParent) {
......
125 126
		}
126 127
		else
127 128
		{
128
			$permissions = 0777 ;
129
			$permissions = defined('OCTAL_DIR_MODE') ? OCTAL_DIR_MODE : 0777;
129 130
			if ( isset( $Config['ChmodOnFolderCreate'] ) )
130 131
			{
131 132
				$permissions = $Config['ChmodOnFolderCreate'] ;
......
300 301
	exit ;
301 302
}
302 303

  
303
?>

304
?>

Also available in: Unified diff